Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Faster-than-light, asynchronous, structured logger in Go with zero allocation count.

License

NotificationsYou must be signed in to change notification settings

ssgreg/logf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDocBuild StatusGo Report StatusCoverage Status

Faster-than-light, asynchronous, structured logger in Go with zero allocation count.

Example

The following example creates a newlogf logger and logs a message.

package mainimport ("runtime""github.com/ssgreg/logf")funcmain() {// The default channel writer writes to stdout using json encoder.writer,writerClose:=logf.NewChannelWriter.Default()deferwriterClose()logger:=logf.NewLogger(logf.LevelInfo,writer)logger.Info("got cpu info",logf.Int("count",runtime.NumCPU()))}

The output is the following:

{"level":"info","ts":"2018-11-03T09:49:56+03:00","msg":"got cpu info","count":8}

Benchmarks

TODO

TODOs

Benchmarks:

  • benchmarks descriptions
  • non-parallel execution explanation
  • scenario decomposition
  • use zerolog object and array marshaller
  • add checked logging for normal (not disabled) cases

Encoder:

  • move to clone
  • use EscapeString instead

About

Faster-than-light, asynchronous, structured logger in Go with zero allocation count.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp