-
Notifications
You must be signed in to change notification settings - Fork 83
The Dlog Package
Patrick Stephen edited this page Dec 4, 2021
·
3 revisions
Oak internally has all of it's debug and logging calls go through the dlog
package.
The default logger in dlog
will write to os.Stdout
. This can be augmented with additional outputs like a log file via dlog.SetOutput
.
The default logger supports three levels of logging: Verb
, Info
, and Error
, and will only output messages that match a customizable filter function (via SetFilter
). The initial error level and string filter are set through the oak.Config
object when oak.Init
is called.
Replace the top-level dlog.DefaultLogger
to implement your own logger (or point oak at a logging solution like logrus or zerolog).