gitlab.com/rumpelsepp/logging (go): Package logging provides a partial reimplementation of the log package in the standard library. This package provides simple logging with loglevels and an interface quite similar to the standard library. There are two environment variables supported:  GOLOGGING_LOGLEVEL  In addition to the SetLogLevel() methods, the loglevel can be set globally via an environment variable. The recognized values are: ERROR, WARN, INFO, DEBUG, and TRACE.  GOLOGGING_MODULES  An optional module string can be set for each logger. This environment variable enables filtering on a module basis. A comma seperated list of strings is accepted. If GOLOGGING_MODULES is set to e.g. "dial,listen", only loggers with the module set to "dial", or "listen" emit output. If you need more sophisticated filtering, this can be done outside of your program using e.g. syslogd(8) or systemd-journald(8).  For your convenience, there is a package level logger available, which can be accessed using the relevant methods. The package level logger is there for programs that do not need several loggers. It aims to simplify this particular usecase. If you need several loggers, please instantiate them as needed and do not use the package level logger.  Timestamps are not supported by design, since this is almost always not needed. On the terminal, you can pipe the output through ts(1) from moreutils. Using a logging service, the timestamps are already handled perfectly. This avoids the annoying problem of doubled timestamps in the log database, such as: Aug 10 07:24:37 host service[pid]: TIMESTAMP MESSAGE.
Keywords: golang|logging|loglevel|simple