Commit Graph

117 Commits

Author SHA1 Message Date
Kevin Wan
804a56bd14
fix: optimize logx for less GC objects (#3627) 2023-10-15 23:37:45 +08:00
Kevin Wan
4222fd97bc
chore: add test for logging rotate size (#3587) 2023-09-24 22:28:03 +08:00
xt-inking
5e435b6a76
fix: avoid losing logs before closing (#3573) 2023-09-17 11:38:53 +00:00
MarkJoyMa
4cbfdb3d74
feat: optimize must log add stack (#3384) 2023-06-30 01:11:03 +00:00
Kevin Wan
92e5819e91
opt: improve logx performance (#3371) 2023-06-25 15:41:28 +08:00
Kevin Wan
efa6940001
chore: improve logx gzip (#3332) 2023-06-09 22:50:59 +08:00
Ron_haur
da81d8f774
Fix: logx with Compress auto delete old logs (#3329)
Co-authored-by: haoran.ren <haoran.ren@mihoyo.com>
2023-06-08 11:08:04 +00:00
Kevin Wan
452c9dbcaf
chore: add more tests (#3315) 2023-06-01 21:08:44 +08:00
Kevin Wan
44c8d6f269
chore: add more tests (#3304) 2023-05-30 23:27:27 +08:00
Kevin Wan
28d3905731
chore: add more tests (#3294) 2023-05-28 19:26:45 +08:00
guangwu
ef26b39b4c
misspelling (#3248) 2023-05-24 08:15:27 +00:00
soasurs
8762a3b7ba
fix: Errorv should generate JSON Object for content field in log (#3222)
Signed-off-by: soasurs <soasurs@gmail.com>
2023-05-08 09:16:44 +00:00
Kevin Wan
42300a7d83
chore: add more tests (#3203) 2023-05-04 23:43:34 +08:00
Kevin Wan
b028ed058d
chore: change port to 6060 by default in devserver (#3191) 2023-05-01 11:18:15 +08:00
Kevin Wan
a31256b327
chore: add more tests (#3187) 2023-04-29 22:59:07 +08:00
Kevin Wan
14caf5c799
chore: simplify tests with logtest (#3184) 2023-04-29 20:36:29 +08:00
Kevin Wan
60a13f1e53
chore: add more tests (#3018) 2023-03-12 20:42:50 +08:00
anqiansong
4620924105 Fix typo 2023-03-08 15:32:08 +00:00
kevin
d65801f258 chore: add comments 2023-03-02 04:32:24 +00:00
Kevin Wan
99a7e6600d
feat: use dependabot for goctl (#2869)
* feat: use dependabot for goctl

* chore: add more tests

* chore: remove temp file
2023-02-11 16:32:28 +08:00
Kevin Wan
a019a1f59f
fix: conf anonymous overlay problem (#2847) 2023-02-05 14:40:57 +08:00
Kevin Wan
ae87114282
chore: change interface{} to any (#2818)
* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
2023-01-24 16:32:02 +08:00
Kevin Wan
32a59dbc27
chore: refactor func name (#2804)
* chore: refactor func name

* chore: make plain log clearer
2023-01-18 17:20:45 +08:00
Kevin Wan
74e0676617
feat: add config to truncate long log content (#2767) 2023-01-09 09:39:30 +08:00
Kevin Wan
e52dace416
chore: refactor (#2764) 2023-01-07 14:13:44 +08:00
chen quan
dc260f196a
refactor: simplify the code (#2763)
* refactor: simplify the code

* fix: fix data race

* refactor: simplify the code

* refactor: simplify the code
2023-01-07 13:32:56 +08:00
Kevin Wan
036328f1ea
chore: update tests (#2741)
* chore: update tests

* chore: codecov on comments

* chore: codecov on comments
2023-01-03 18:02:35 +08:00
Xargin
1c544a26be
use stat instead of disableStat (#2740) 2023-01-03 11:29:24 +08:00
chainlife
20a61ce43e
logx conf add DisableStat (#2434)
Co-authored-by: sunsoft <sunsoft@qq.com>
2023-01-02 23:22:13 +08:00
Kevin Wan
9941055eaa
feat: add trace.SpanIDFromContext and trace.TraceIDFromContext (#2654) 2022-12-02 11:00:44 +08:00
edieruby
b1c3c21c81
fix: log currentSize should not be 0 when file exists and size is not 0 (#2639) 2022-11-25 23:48:32 +08:00
Kevin Wan
7eb6aae949
fix: potential slice append issue (#2560) 2022-10-28 08:14:03 +08:00
Kevin Wan
06e4914e41
feat: add logger.WithFields (#2546) 2022-10-22 23:28:34 +08:00
Kevin Wan
d4c9fd2aff
chore: add golangci-lint config file (#2519)
* chore: add golangci-lint config file

* chore: member alignment
2022-10-14 22:45:48 +08:00
Kevin Wan
59c0013cd1
feat: add logc package, support AddGlobalFields for both logc and logx. (#2463)
* feat: add logc package

* feat: add logc, add AddGlobalFields for both logc and logx

* chore: add benchmarks

* chore: add more tests

* chore: simplify globalFields in logx

* chore: remove outdated comments
2022-09-29 22:49:41 +08:00
chen quan
2e1e4f3574
feat: add color to debug (#2433) 2022-09-21 22:30:06 +08:00
Kevin Wan
22d0a2120a
chore: replace fmt.Fprint (#2425) 2022-09-20 23:51:58 +08:00
chen quan
68e15360c2
fix: fix log output (#2424) 2022-09-20 22:45:52 +08:00
MarkJoyMa
e6aa6fc361
feat: add log debug level (#2411) 2022-09-20 07:50:11 +08:00
Kevin Wan
0b1884b6bd
feat: support caller skip in logx (#2401)
* feat: support caller skip in logx

* chore: remove debug prints

* chore: remove debug prints

* chore(deps): bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc (#2402)

Bumps [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) from 1.9.0 to 1.10.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.9.0...v1.10.0)

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

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

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

* chore: simplify test code

* chore: remove new WithFields in logx, and deprecated old WithFields

* chore: simplify WithDuration

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-17 22:48:24 +08:00
Kevin Wan
d935c83a54
feat: support baggage propagation in httpc (#2375)
* feat: support baggage propagation in httpc

* chore: use go 1.16

* chore: use go 1.16

* chore: use go ^1.16

* chore: remove deprecated
2022-09-10 15:18:52 +08:00
Kevin Wan
dfeef5e497
fix: thread-safe in getWriter of logx (#2319) 2022-08-29 08:32:17 +08:00
Archer
8c72136631
make logx#getWriter concurrency-safe (#2233)
* make logx#getWriter concurrency-safe

* make logx#getWriter concurrency-safe
2022-08-28 22:10:50 +08:00
Kevin Wan
2d60f0c65a
fix: logx disable not working in some cases (#2306)
* fix: logx disable not working in some cases

* fix: test fail
2022-08-27 19:24:31 +08:00
chen quan
847a396f1c
fix(logx): display garbled characters in windows(DOS, Powershell) (#2232)
* fix(logx): display garbled characters in windows(DOS, Powershell)

* Update writer.go
2022-08-23 22:45:11 +08:00
Kevin Wan
05dd6bd743
chore: refactor logx (#2262) 2022-08-14 13:58:06 +08:00
chen quan
4fad067a0e
fix(logx): need to wait for the first caller to complete the execution. (#2213) 2022-08-03 23:59:39 +08:00
Kevin Wan
5cd9229986
fix: only setup logx once (#2188)
* fix: only setup logx once

* fix: test failure

* chore: not reset logging level in reset

* chore: refactoring
2022-07-28 22:08:48 +08:00
施国鹏
3d38d36605
fix: logx test foo (#2144)
constant testlog "Stay hungry, stay foolish." contains foo(foolish), changed to foo1
2022-07-28 21:29:56 +08:00
Kevin Wan
9b334b5428
chore: let logx.SetWriter can be called anytime (#2186) 2022-07-24 14:15:57 +08:00