55 Commits

Author SHA1 Message Date
css521
3000824ac5
Update Request Header Prefixes and Upgrade API Version to 0.6.0 (#5772)
* Update Request Header Prefixes and Upgrade API Version to 0.6.0

- Changed all HTTP request header prefixes from `x-sls-` to `x-log-` to comply with the latest API specifications.
- Adjusted header prefix validation in `signature.go` to support `x-log-` and `x-acs-`.
- Replaced `x-sls-bodyrawsize` with `x-log-bodyrawsize` in multiple files (`log_project.go`, `request.go`, etc.).
- Updated header fields for compression type and signing method (e.g., `x-sls-compresstype` to `x-log-compresstype`).
- Modified authorization logic to replace `SLS` with `LOG`.

* Refactor signature generation logic for improved readability and maintainability

Split the signature generation logic into several independent functions, including header extraction, standardized header construction, and resource string generation. This modular design enhances code clarity, reduces redundant logic, and improves error handling mechanisms. Additionally, comments and code structure have been optimized to ensure easier extension and debugging.

---------

Co-authored-by: 优胜 <zhushaofei.zsf@alibaba-inc.com>
2025-04-11 16:19:46 +08:00
binlihpu
d5830a0fc2 Update log.go
fix comment
2024-10-06 14:45:59 +08:00
Alan Xu
06d869664a
session: Support SessionReleaseIfPresent to avoid concurrent problem (#5685) 2024-07-31 21:44:47 +08:00
Alan Xu
bdb7e7a904 docs(log_store.go): fix typo
fix typo
2024-07-29 15:55:33 +08:00
Deng Ming
8f89e12e6c fix GHSA-6g9p-wv47-4fxq 2024-04-25 16:55:18 +08:00
Seiya
0609076950
use filepath.Join() to build file paths (#5617)
* use filepath.Join() to build file paths

* use filepath.Join() to build file paths
2024-03-31 21:26:35 +08:00
racerole
29de4e3a3d chore: remove repetitive words
Signed-off-by: racerole <jiangyifeng@outlook.com>
2024-03-12 23:40:09 +08:00
Oleksandr Redko
426aad68dc
refactor: replace deprecated github.com/pkg/errors with errors pkg (#5577) 2024-02-02 22:56:28 +08:00
Ming Deng
0bd2df91a1
Resolve conflicts among master branch and develop branch (#5286)
* feature extend readthrough for cache module (#5116)

* feature 增加readthrough

* feature: add write though for cache mode (#5117)

* feature: add writethough for cache mode

* feature add singleflight cache (#5119)

* build(deps): bump go.opentelemetry.io/otel/trace from 1.8.0 to 1.11.2

Bumps [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) from 1.8.0 to 1.11.2.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.8.0...v1.11.2)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix 5129: must set formatter after init the logger

* remove beego.vip

* build(deps): bump actions/stale from 5 to 7

Bumps [actions/stale](https://github.com/actions/stale) from 5 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix 5079: only log msg when the channel is not closed (#5132)

* optimize test

* upgrade otel dependencies to v1.11.2

* format code

* Bloom filter cache (#5126)

* feature: add bloom filter cache

* feature upload remove all temp file

* bugfix Controller SaveToFile remove all temp file

* rft: motify BeeLogger signalChan (#5139)

* add non-block write log in asynchronous mode (#5150)

* add non-block write log in asynchronous mode

---------

Co-authored-by: chenhaokun <chenhaokun@itiger.com>

* fix the docsite URL (#5173)

* Unified gopkg.in/yaml version to v2 (#5169)

* Unified gopkg.in/yaml version to v2 and go mod tidy

* update CHANGELOG

* bugfix: protect field access with lock to avoid possible data race (#5211)

* fix some comments (#5194)

Signed-off-by: cui fliter <imcusg@gmail.com>

* build(deps): bump github.com/prometheus/client_golang (#5213)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.15.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.14.0...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump go.etcd.io/etcd/client/v3 from 3.5.4 to 3.5.9 (#5209)

Bumps [go.etcd.io/etcd/client/v3](https://github.com/etcd-io/etcd) from 3.5.4 to 3.5.9.
- [Release notes](https://github.com/etcd-io/etcd/releases)
- [Commits](https://github.com/etcd-io/etcd/compare/v3.5.4...v3.5.9)

---
updated-dependencies:
- dependency-name: go.etcd.io/etcd/client/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* cache: fix typo and optimize the naming

* Release 2.1.0 change log

* bugfix: beegoAppConfig String and Strings function has bug

* httplib: fix unstable test, do not use httplib.org

* chore: pkg imported more than once

* chore: fmt modify

* chore: Use github.com/go-kit/log

* chore: unnecessary use of fmt.Sprintf

* fix: golangci-lint error

* orm: refactor ORM introducing internal/models pkg

* remove adapter package

* build(deps): bump github.com/bits-and-blooms/bloom/v3

Bumps [github.com/bits-and-blooms/bloom/v3](https://github.com/bits-and-blooms/bloom) from 3.3.1 to 3.5.0.
- [Release notes](https://github.com/bits-and-blooms/bloom/releases)
- [Commits](https://github.com/bits-and-blooms/bloom/compare/v3.3.1...v3.5.0)

---
updated-dependencies:
- dependency-name: github.com/bits-and-blooms/bloom/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* feat: add write-delete cache mode

* fix: unnecessary assignment to the blank identifier

* fix: add change into .CHANGELOG file

* build(deps): bump golang.org/x/sync from 0.1.0 to 0.3.0

Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.1.0 to 0.3.0.
- [Commits](https://github.com/golang/sync/compare/v0.1.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump golang.org/x/crypto

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20220315160706-3147a52a75dd to 0.10.0.
- [Commits](https://github.com/golang/crypto/commits/v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* remove golang--lint-ci

* Beego web.Run() runs the server twice

* fix 5255: Check the rows.Err() if rows.Next() is false

* closes 5254: %COL% should be a common placeholder

* build(deps): bump github.com/prometheus/client_golang

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: use of ioutil package (#5261)

* fix ioutil.NopCloser

* fix ioutil.ReadAll

* fix ioutil.ReadFile

* fix ioutil.WriteFile

* run goimports -w -format-only ./

* update CHANGELOG.md

* feature: add write-double-delete cache mode (#5263)

* cache/redis: support skipEmptyPrefix option (#5264)

* fix: refactor InsertValue method (#5267)

* fix: refactor insertValue method and add the test

* fix: exec goimports and add Licence file header

* fix: modify construct method of dbBase

* fix: add modify record into CHANGELOG

* fix: modify InsertOrUpdate method (#5269)

* fix: modify InsertOrUpdate method, Remove the isMulti variable and its associated code

* fix: Delete unnecessary judgment branches

* fix: add modify record into CHANGELOG

* cache/redis: use redisConfig to receive incoming JSON (previously using a map) (#5268)

* refactor cache/redis: Use redisConfig to receive incoming JSON (previously using a map).

* refactor cache/redis: Use the string type to receive JSON parameters.

---------

Co-authored-by: Tan <tanqianheng@gmail.com>

* fix: refactor Delete method (#5271)

* fix: refactor Delete method and add test

* fix: add modify record into CHANGELOG

* fix: refactor update sql (#5274)

* fix: refactor UpdateSQL method and add test

* fix: add modify record into CHANGELOG

* fix: modify url in the CHANGELOG

* fix: modify pr url in the CHANGELOG

* Fix setPK function for table without primary key (#5276)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: cui fliter <imcusg@gmail.com>
Co-authored-by: Stone-afk <73482944+Stone-afk@users.noreply.github.com>
Co-authored-by: hookokoko <hooko@tju.edu.cn>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hookokoko <648646891@qq.com>
Co-authored-by: Stone-afk <1711865140@qq.com>
Co-authored-by: chenhaokun <chenhaokun@itiger.com>
Co-authored-by: Xuing <admin@xuing.cn>
Co-authored-by: cui fliter <imcusg@gmail.com>
Co-authored-by: guoguangwu <guoguangwu@magic-shield.com>
Co-authored-by: uzziah <uzziahlin@gmail.com>
Co-authored-by: Hanjiang Yu <delacroix.yu@gmail.com>
Co-authored-by: Kota <mdryzk64smsh@gmail.com>
Co-authored-by: Uzziah <120019273+uzziahlin@users.noreply.github.com>
Co-authored-by: Handkerchiefs-t <59816423+Handkerchiefs-t@users.noreply.github.com>
Co-authored-by: Tan <tanqianheng@gmail.com>
Co-authored-by: mlgd <mlgd17@gmail.com>
2023-07-31 23:00:02 +08:00
hookokoko
f1dea5b811 add non-block write log in asynchronous mode (#5150)
* add non-block write log in asynchronous mode

---------

Co-authored-by: chenhaokun <chenhaokun@itiger.com>
2023-05-27 14:41:51 +08:00
Stone-afk
fb76377a3e rft: motify BeeLogger signalChan (#5139) 2023-05-27 14:41:51 +08:00
Deng Ming
0bee140abb format code 2023-05-27 14:41:51 +08:00
Ming Deng
2d2e11d57d fix 5079: only log msg when the channel is not closed (#5132) 2023-05-27 14:41:51 +08:00
Deng Ming
85473bc898 fix 5129: must set formatter after init the logger 2023-05-27 14:41:51 +08:00
Ming Deng
76343e4422
Prepare Release 2.0.6 (#5104)
* add: generic cache random time offset expired.

* bugfix: Csrf token should be Secure and httpOnly, but not now

* fix: expose the Offset property to allow external modifications

* improving the concurrency performance of random value calculation

* add WithOffsetFunc to define private RandomExpireCache.offset field

* fix: add seconds definition

* build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.8.0

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix 4907: force admin service http only

* Feat: add get all tasks function (#4999)

* feat: add get all tasks function

* Refine Comments : admin/profile.go,bean/mock.go,config/global.go... (#5009)

* Refine Comments

* refine comments for cache.go

* refine comments for log.go

* Update orm.go

* refine comments for orm_log.go,types.go

* Update utils.go

* Update doc.go

* refine comments for for four files (#5011)

* refine comments for cache.go

* refine comments for log.go

* Update orm.go

* refine comments for orm_log.go,types.go

* Update utils.go

* Update doc.go

* Update db.go

* fix pass []any as any in variadic function by asasalint (#5012)

* fix pass []any as any in variadic function

* add change log

* build(deps): bump go.opentelemetry.io/otel/trace from 1.7.0 to 1.8.0 (#5019)

Bumps [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* refine comments for package core  (#5014)

* Refine Comments

* refine comments for cache.go

* refine comments for log.go

* Update orm.go

* refine comments for orm_log.go,types.go

* Update utils.go

* Update doc.go

* refine comments

* refine comments

* Update db.go

* refine comments for core

* build(deps): bump go.opentelemetry.io/otel/exporters/stdout/stdouttrace (#5018)

Bumps [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://github.com/open-telemetry/opentelemetry-go) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/exporters/stdout/stdouttrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix 5022: Miss assiging ln to graceful Server (#5028)

* prepare for releasing v2.0.5

* prepare for releasing v2.0.5 (#5032)

* feat: make commands and docker compose for ORM unit tests (#5031)

* feat: make commands and docker compose for ORM unit tests

Signed-off-by: mango <xu.weiKyrie@foxmail.com>

* add changelog

Signed-off-by: mango <xu.weiKyrie@foxmail.com>

Signed-off-by: mango <xu.weiKyrie@foxmail.com>

* Modify comment syntax error (#5094)

* fix: revise the body wrapper to handle empty body case (#5102)

Fix the router.go serverHttp method, wrap the body if the request body
is empty, which can avoid panic when calling the CopyBody method.

Signed-off-by: chlins <chenyuzh@vmware.com>

Signed-off-by: chlins <chenyuzh@vmware.com>

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: mango <xu.weiKyrie@foxmail.com>
Signed-off-by: chlins <chenyuzh@vmware.com>
Co-authored-by: auual <ding@ibyte.me>
Co-authored-by: Leon Ding <deen.job@qq.com>
Co-authored-by: dada0z <zhang.guangda@qq.com>
Co-authored-by: kevinzeng <kevinzeng@zego.im>
Co-authored-by: Kevin Tsang <39397413+ktalg@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: 日暮颂歌1991 <448081525@qq.com>
Co-authored-by: Regan Yue <1131625869@qq.com>
Co-authored-by: alingse <alingse@foxmail.com>
Co-authored-by: mango <35127166+mangoGoForward@users.noreply.github.com>
Co-authored-by: 王哈哈 <31426858+wanghaha-dev@users.noreply.github.com>
Co-authored-by: Chlins Zhang <chlins.zhang@gmail.com>
2022-11-23 00:06:32 +08:00
Deng Ming
981074340a logs: multiFileLogWriter uses incorrect formatter 2022-05-16 22:13:08 +08:00
hezhaoyang
d98ab11096 fix: inject propagator header
feat: set error tag as true
fix: unit test issue
fix: deep source check error
2022-04-25 18:04:15 +08:00
Deng Ming
174291a3c8 fix 4911: make the argument work 2022-04-17 18:27:21 +08:00
Deng Ming
9081c40eaa Merge branch 'master' of github.com:beego/beego into dev 2022-01-28 00:12:47 +08:00
Deng Ming
3e886f71ca replace beego.me with beego.vip 2021-11-29 21:29:29 +08:00
Deng Ming
fe4b84e4f6 fix4791: delay to format parameter 2021-10-25 22:30:21 +08:00
nichtsen
415968070f logs: fix TestFilePermWithPrefixPath function 2021-09-14 15:01:51 +08:00
nichtsen
8ba0b4f1b8 log: use fileinfo interface for tests 2021-09-13 11:21:34 +08:00
nichtsen
a3d2dd12d6 deepsource: fix Control-coupled functions detected 2021-09-08 14:40:46 +08:00
nichtsen
16549e5019 deepsource: fix confusing naming of struct fields 2021-09-08 14:03:59 +08:00
nichtsen
1a52d005b1 logs: fix comment spelling 2021-09-07 19:18:02 +08:00
nichtsen
cc19834f79 deepsource: removing unused method receiver 2021-09-07 19:14:49 +08:00
nichtsen
9587f6d16c deepsource: empty string test improving 2021-09-07 19:12:19 +08:00
nichtsen
435196300e deepsource: simplify error construction 2021-09-07 19:08:55 +08:00
nichtsen
9212d69383 logs: add tests for directory permissions 2021-09-07 19:07:20 +08:00
nichtsen
918bc8d11c add comments for Perm and DirPerm 2021-09-07 18:27:52 +08:00
nichtsen
8b57b22c20 fix numeric notation of permissions 2021-09-07 16:14:43 +08:00
Ming Deng
4437c6eb11 merge master 2021-09-03 11:40:13 +08:00
Ming Deng
334609a1ea Fix 4728: Print wrong file number 2021-08-19 20:20:01 +08:00
t29kida
4eb19f938a fix sonar problem
* Delete FIXME comment, because `string == ""` is beter than `len(string)` for checking string existence(by sonar)
* Remove duplicated code
* Fill empty block of code
2021-06-09 19:42:18 +09:00
loyalsoldier
41790b80ac
Fix lint and format code in core dir 2021-06-06 21:00:27 +08:00
08cde0b55d [fix bug]console more empty line 2021-05-22 14:49:52 +08:00
loyalsoldier
7b99c324be
Fix code according to deepsource 2021-05-19 22:27:19 +08:00
loyalsoldier
2b7401109f
Chore: format code 2021-05-19 22:27:17 +08:00
Ming Deng
3acc858909 Merge master and develop 2021-04-05 20:55:30 +08:00
王厚伟
10860b2d27 fix log level 2021-03-16 23:22:54 +08:00
Nitin Mohan
f554a1c543 Optimize maligned structs 2021-03-08 13:01:47 +05:30
Ming Deng
45ab79249a Add when to write method 2021-02-21 12:39:46 +08:00
Ming Deng
cec95bb6d0 Fix log format bug 2021-02-05 23:28:58 +08:00
Ming Deng
4855146ac6 Fix log format bug 2021-02-05 23:12:42 +08:00
Jihoon Seo
2bb6c45786 Update beego pkg paths 2021-01-28 13:35:38 +09:00
王厚伟
4b2bd716b6 fix log level 2021-01-03 17:52:48 +08:00
Ming Deng
d4da82ef77 format code 2020-12-14 12:34:55 +08:00
Ming Deng
7bc6010604 rename to v2 2020-12-14 11:12:00 +08:00
Ming Deng
a70f7fc920 using new organization 2020-12-13 23:09:19 +08:00