This is great when the name is included in an formatter, like the ColoredTextFormatter. Yet, when configuring the log output per module it is more flexible to have the full path available like glog does. This allows us to add features like setting the log level for a certain path, like:
LOG='github.com/pjvds/tidy/*:DEBUG' myapp
It also allows to set the level even if package names (last part of a package path) collides.
Currently a module type is defined as a string:
This means it only reflects the package name, and doesn't store the package path. As an example:
The code above will print:
This is great when the name is included in an formatter, like the
ColoredTextFormatter
. Yet, when configuring the log output per module it is more flexible to have the full path available like glog does. This allows us to add features like setting the log level for a certain path, like:It also allows to set the level even if package names (last part of a package path) collides.