Skip to content

black-desk/zap-journal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zap-journal

This is a extension of zap which implement zapcore.Encoder and zapcore.WriteSyncer of systemd-journal.

Check ./example/example.go for usage.

Thanks

Note

  1. The default logger setup (zapjournal.New() and zapjournal.NewDebug()) produce a named logger with the executable file name get from os.Executable(). This behavior is different from zap.

  2. The key passed to zap will be convert to UPPERCASE. And all in key will be replaced with _. As journald seems refuse to record such fields.

  3. journalctl will not show any custom fields by default. And it not support any format customization option to display custom fields. But it has an option to output log as json which can be pass to jq, Then that be formatted to a human readable output.

    Check journalfmt as well.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages