Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
SetLevel(logrus.Level) // inside this function you can log the change of level
}
Logger is an interface used by the log level switcher Service Activity to set the level of a logger.
type ServiceActivity ¶
type ServiceActivity struct {
// contains filtered or unexported fields
}
ServiceActivity implements the async.Runner & async.Closer interface for switching a logger level through command line.
func New ¶
func New(l Logger, s os.Signal) *ServiceActivity
New creates a new service activity that listens for a specific os signal and attempts to toggle the level of the provided logger to debug mode.
Click to show internal directories.
Click to hide internal directories.