1
loggo - hierarchical loggers for Go
2
===================================
4
This package provides an alternative to the standard library log package.
6
The actual logging functions never return errors. If you are logging
7
something, you really don't want to be worried about the logging
10
Modules have names that are defined by dotted strings.
15
There is a root module that has the name `""`. Each module
16
(except the root module) has a parent, identified by the part of
17
the name without the last dotted value.
18
* the parent of `"first.second.third"` is `"first.second"`
19
* the parent of `"first.second"` is `"first"`
20
* the parent of `"first"` is `""` (the root module)
22
Each module can specify its own severity level. Logging calls that are of
23
a lower severity than the module's effective severity level are not written
26
Loggers are created using the GetLogger function.
28
logger := loggo.GetLogger("foo.bar")
31
By default there is one writer registered, which will write to Stderr,
32
and the root module, which will only emit warnings and above.
34
Use the usual `Sprintf` syntax for:
44
If in doubt, look at the tests. They are quite good at observing the expected behaviour.
46
The loggers themselves are go-routine safe. The locking is on the output to the writers, and transparent to the caller.