Skip to content
/ ZLog.jl Public

A Julia wrapper for the excellent zlog library

Notifications You must be signed in to change notification settings

tmlbl/ZLog.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZLog

Build Status

This is a light wrapper around zlog to provide highly performant logging for Julia.

Getting started is simple using the default configuration, which logs to stdout:

using ZLog

ZLog.init()

info("Testing info")
warn("Testing warn")
debug("Testing debug")
err("Testing error")

To use your own configuration file, simply provide the path to init:

ZLog.init(joinpath(pwd(), "myconfig.conf"))

Key-value data is supported via keyword arguments to the logging functions.

julia> info("Some data"; key="value")
2016-04-17 14:07:36 INFO   Some data [key=value]

The logging functions use the category "default" by default. If you are using your own config and want to use the convenience functions, be sure to define the "default" category. Other categories can be used like so:

mycat = ZLog.Category("mycat")
info(mycat, "A special message")

TODO

  • Make default config closer to syslog standard

About

A Julia wrapper for the excellent zlog library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages