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 Conf ¶ added in v1.0.4
type Conf struct { //TODO Default ConfDefault Loggers []ConfLogger }
Conf is a binding that supports to define default log levels for multiple loggers
type ConfLogger ¶ added in v1.0.4
ConfLogger is configuration of a particular logger. Currently we support only logger level.
type Deps ¶
type Deps struct { Log logging.PluginLogger //inject PluginName core.PluginName //inject config.PluginConfig //inject LogRegistry logging.Registry // inject HTTP rest.HTTPHandlers // inject }
Deps groups dependencies injected into the plugin so that they are logically separated from other plugin fields.
type LoggerData ¶
LoggerData encapsulates parameters of a logger represented as strings.
type Plugin ¶
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.