Documentation ¶
Overview ¶
Package logmanager implements the log manager that allows users to set log levels at run-time via a REST API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct { local.PluginLogDeps // inject LogRegistry logging.Registry // inject HTTP *rest.Plugin // inject }
Deps is here to group injected dependencies of plugin to not mix with other plugin fields.
type LoggerData ¶
LoggerData encapsulates parameters of a logger represented as strings.
type Plugin ¶
type Plugin struct {
Deps
}
Plugin allows to manage log levels of the loggers using HTTP.
func (*Plugin) AfterInit ¶
AfterInit is called at plugin initialization. It register the following handlers:
- List all registered loggers: > curl -X GET http://localhost:<port>/log/list
- Set log level for a registered logger: > curl -X PUT http://localhost:<port>/log/<logger-name>/<log-level>
Click to show internal directories.
Click to hide internal directories.