Categorygithub.com/stewelarend/logger
modulepackage
0.0.4
Repository: https://github.com/stewelarend/logger.git
Documentation: pkg.go.dev

# Packages

Package fakelib demonstrates how a library should do loggingand in logger_test.go, this is controlledlibrary will be on error level by default, but test/program can control its levels.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
careful with this - will also set for all named loggers used in librariesrather create your own logger and set its level, or set level on Named(...).SetLevel(...)still: setting level like this will only affect loggers that did not set their own levelslibraries should just create logger that defaults to level error, and then will be changedby this or Named(...).SetLevel()If a library did New().WithLevel(), it will not be affected by any of this...so libraries should not set their levels! Then level is in the named.level and all loggerscreated for it will use LevelDefault to inherit from the named...
SetGlobalWriter sets the writer on top and all existing and default for all new loggers.

# Constants

No description provided by the author
use parent's level.
No description provided by the author
No description provided by the author

# Structs

e.g.:.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
ILogger does loggingit can only be created from a INamedLogger which gives the structure to control log levels by name during run-time but that actually only control the writer's level, which is used by all loggers with the same nameafter creating a logger, the logger level can be changed in code, e.g.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author