1
0
mirror of https://github.com/rs/zerolog synced 2026-06-08 17:13:30 +00:00
Commit Graph

358 Commits

Author SHA1 Message Date
crazy-pe 8582bed24f fix: use TimestampFunc in busrt sampler (#671) (#672) 2024-05-01 04:19:37 +02:00
Mitar 7d9db06a53 Allow setting floating point precision in JSON. (#663) 2024-04-28 17:02:53 +02:00
Olivier Poitrey e5aa7e3627 Revert #662
PR approved by mistake.
2024-04-24 02:19:07 +02:00
Andrey Karpov 0efa414907 Fix panic caused by an extra malformed level field (#665) 2024-04-24 02:13:48 +02:00
camcui eb081e1fa2 chore: fix some typos in comments (#667) 2024-04-12 11:07:29 +02:00
Ruben Poppe 2d899f0cf9 set debug log color (#662) 2024-04-05 16:58:55 +02:00
Pavel Griaznov 74cf37a396 Add EmptyFields method to remove all the fileds from logger (#575)
Co-authored-by: Olivier Poitrey <rs@rhapsodyk.net>
Co-authored-by: tlipoca9 <160737620+tlipoca9@users.noreply.github.com>
2024-03-05 22:57:20 -08:00
Konstantin Pechenenko e5edd4b8ec Refactor: make code in comment valid and runable (#654) 2024-03-03 00:52:46 +01:00
Felipe Gasper 582007f21d Add a time.Location to ConsoleWriter. (This allows UTC timestamps.) (#531)
* Add a time.Location to ConsoleWriter. (This allows UTC timestamps.)

* add test
2024-03-02 01:52:31 +01:00
Youming Lin 54ebf468e5 doc: update readme to use os-specific path separator (#534)
* update readme to use os-specific path separator
* shorten getShortLineNo example to one liner
2024-03-02 01:50:13 +01:00
Joseph Cumines bda298df4a Fix JSON encoding of float exponents to be like json.Marshal / ES6 (#537)
* Fix JSON encoding of float exponents to be like json.Marshal / ES6
* Add test cases for the *e-9 JSON number encoding edge case
2024-03-02 01:49:38 +01:00
Mitar 0d16f63a8a Disable HTML escaping in InterfaceMarshalFunc. (#568) 2024-03-02 01:33:56 +01:00
赵士杰 dfd022fdfd Update README.md (#593)
default log level is trace , not debug
2024-03-02 01:30:48 +01:00
Anuraag (Rag) Agrawal 159cb37bb9 Fix context retrieval in hook example (#603) 2024-03-02 01:30:20 +01:00
dependabot[bot] bd2896587d Bump actions/setup-go from 4 to 5 (#625)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-04 15:50:57 +01:00
dependabot[bot] af58707cd9 Bump actions/cache from 3 to 4 (#638)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-04 15:49:00 +01:00
Sergey 9e60b1cb8e Add prettylog time format (#645) 2024-02-04 15:48:38 +01:00
Sergey 147ae65350 Fix prettylog piping (#644) v1.32.0 2024-02-01 01:56:59 +01:00
Garret Buell 4d78dc5ffa Add forwarding close methods to several writer implementations (#636) 2024-01-13 19:08:26 +01:00
Garret Buell c1ab4ed9bf Make Log.Fatal() call Close on the writer before os.Exit(1) (#634) 2024-01-13 10:25:59 +01:00
Hyuga 417580d1ce add: ContextLogger Interface LogObjectMarshaler (#623) 2024-01-04 14:45:09 +01:00
Naveen 602e90aeea Fixed failing tests (#626) 2024-01-04 14:41:14 +01:00
Vitalii Solodilov a9ec232b3e Add stacktrace to Context (#630) 2024-01-03 05:40:23 +01:00
Halimao 3e8ae07aba Refactor: change Hook(h Hook) to Hook(hooks ...Hook) (#629) 2023-12-24 14:05:00 +01:00
Naveen 7fa45a4dda fixed documentation for tracing hook (#621) 2023-11-29 04:24:25 +01:00
Mitar 93fb5cb215 Add TriggerLevelWriter. (#602)
See: https://github.com/rs/zerolog/issues/583
2023-11-27 22:20:40 -05:00
Sami Kerola 83e03c75d9 stop using deprecated io/ioutils package (#620) (#620) 2023-11-24 22:16:01 +01:00
Mitar bb14b8b9de Add additional hlog logging handlers (#607)
* Add HTTPVersionHandler.

* Add RemoteIPHandler.

* Add trimPort to HostHandler.

* Add EtagHandler.

* Add ResponseHeaderHandler.

* Add TestGetHost.

* Call AccessHandler's f also on panic.
2023-11-08 21:04:17 +01:00
guangwu e7034c2572 chore: use buf.String() instead of string(buf.Bytes()) (#608) 2023-10-24 04:08:36 +02:00
Mitar c4046fe2cb Zero Logger behaves like Nop logger. (#606) 2023-10-21 04:20:52 +02:00
Mitar 507a426bf8 Use map for formatted levels. (#599) 2023-10-20 16:17:01 +02:00
Gabriel Estavaringo Ferreira 8834256667 Add Println top level method (#533)
Co-authored-by: estavaringo <gabriel.estavaringo@arquivei.com.br>
2023-10-20 16:15:13 +02:00
Michikawa Masayoshi 2c1cbecf52 hlog: add HostHandler (#604) 2023-10-20 11:59:49 +02:00
Mitar 6ed7439d9c Do not colorize if not necessary. (#598) 2023-10-14 12:38:38 +02:00
Mitar f115bfade5 Make console output more readable. (#597) 2023-10-13 23:38:04 +02:00
Mitar f70fcca1ab Update example image to how it is currently rendered. (#596) 2023-10-13 13:55:44 +02:00
Olivier Poitrey 6e8841b038 prettylog: add support for file input 2023-10-13 13:54:49 +02:00
Mitar 11f895c15e Add FormatPrepare to ConsoleWriter. (#595) 2023-10-13 10:32:42 +02:00
Julien Robert ed609e7fe6 feat: display error stack when using .Fields() (#560) 2023-10-04 17:54:14 +02:00
Clint Armstrong 9e34cb475c Add Type function to context (#592) 2023-10-04 00:33:11 +02:00
dependabot[bot] 8344fc0c93 Bump actions/checkout from 3 to 4 (#588)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
v1.31.0
2023-09-25 11:28:20 +02:00
Olivier Poitrey 4cb8cc5622 Update dependencies 2023-09-25 11:27:41 +02:00
Subhrodip Mohanta ae9b265137 Update Build Status Badge (#589) 2023-09-22 07:16:02 -07:00
Lasse Gaardsholt 1bac5cca50 added support for NO_COLOR (#586)
* added support for NO_COLOR

Signed-off-by: Lasse Gaardsholt <lasse.gaardsholt@bestseller.com>

* added unit test for `NO_COLOR`

Signed-off-by: Lasse Gaardsholt <lasse.gaardsholt@bestseller.com>

* NO_COLOR can now be set to anything

Signed-off-by: Lasse Gaardsholt <lasse.gaardsholt@bestseller.com>

---------

Signed-off-by: Lasse Gaardsholt <lasse.gaardsholt@bestseller.com>
2023-09-05 11:18:05 +02:00
Mitar b81cc57e5d Fix the standard logger output example (#584) 2023-08-20 15:04:54 +02:00
Olivier Poitrey ad77222f68 chore: improve coverage report 2023-08-18 20:05:14 +02:00
Olivier Poitrey 95cf29c88c chore: switch to go-goverage-report action as gocover.io is closing 2023-08-18 19:50:46 +02:00
Manjunatha Shetty H 802c88f065 chore: adding any function to context (#580)
* chore: adding any function to context
* fixes
2023-08-18 19:41:23 +02:00
Olivier Poitrey 158e4ad5c3 Update logbench URL in README.md 2023-08-14 23:42:26 +02:00
Mitar 7d5aa987d0 Deprecate lint in favor of https://github.com/ykadowak/zerologlint (#574) 2023-08-02 10:27:39 +02:00