fast levelled logging package with customizable formatting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kim 58c424295d much improve Entry API + simplify LogFormat 1 day ago
LICENSE first commit 2 months ago
README.md first commit 2 months ago
clock.go add LogFormat comments, add depth tracking to TextFormat 4 weeks ago
default.go add entry.Args() printing, make []byte obey format state 6 days ago
entry.go much improve Entry API + simplify LogFormat 1 day ago
format.go much improve Entry API + simplify LogFormat 1 day ago
format_text.go much improve Entry API + simplify LogFormat 1 day ago
go.mod test against logrus now (more popular) using mutex'd writer, better quoting handling 1 month ago
go.sum test against logrus now (more popular) using mutex'd writer, better quoting handling 1 month ago
hook.go first commit 2 months ago
level.go update default level strings 2 weeks ago
logger.go perform lvl checks sooner in logger funcs 1 day ago
logger_test.go add some simple arg testing 6 days ago
writer.go test against logrus now (more popular) using mutex'd writer, better quoting handling 1 month ago

README.md

Fast levelled logging package with customizable formatting.

Supports logging in 2 modes:

  • no locks, fastest possible logging, no guarantees for io.Writer thread safety
  • mutex locks during writes, still far faster than standard library logger

Running without locks isn't likely to cause you any issues*, but if it does, you can wrap your io.Writer using AddSafety() when instantiating your new Logger. Even when running the benchmarks, this library has no printing issues without locks, so in most cases you'll be fine, but the safety is there if you need it.

*most logging libraries advertising high speeds are likely not performing mutex locks, which is why with this library you have the option to opt-in/out of them.