From 8fed5e01980996cd34be6e27370eed74b5c0ed5d Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 18 Jun 2018 17:37:27 +0200 Subject: [logger] Improve spec for set_handler_config/3 and set_primary_config/2 Specify which keys and associated values are allowed. --- lib/kernel/doc/src/logger.xml | 115 +++++++++++++++++++++++++----------------- 1 file changed, 70 insertions(+), 45 deletions(-) (limited to 'lib/kernel/doc/src') diff --git a/lib/kernel/doc/src/logger.xml b/lib/kernel/doc/src/logger.xml index 33f1919de0..b1321a93dc 100644 --- a/lib/kernel/doc/src/logger.xml +++ b/lib/kernel/doc/src/logger.xml @@ -97,46 +97,6 @@ logger:error("error happened because: ~p", [Reason]). % Without macro - - - -

Primary configuration data for Logger. The following - default values apply:

- - level => info - filter_default => log - filters => [] - -
-
- - - -

Handler configuration data for Logger. The following - default values apply:

- - level => all - filter_default => log - filters => [] - formatter => {logger_formatter, DefaultFormatterConfig} - -

In addition to these, the following fields are - automatically inserted by Logger, values taken from the - two first parameters - to add_handler/3:

- - id => HandlerId - module => Module - -

Handler specific configuration data is inserted by the - handler callback itself, in a sub structure associated with - the field named config.

-

See the - logger_formatter(3) manual page for - information about the default configuration for this - formatter.

-
-
@@ -171,6 +131,39 @@ logger:error("error happened because: ~p", [Reason]). % Without macro for an example of a formatter implementation.

+ + + +

Handler configuration data for Logger. The following + default values apply:

+ + level => all + filter_default => log + filters => [] + formatter => {logger_formatter, DefaultFormatterConfig} + +

In addition to these, the following fields are + automatically inserted by Logger, values taken from the + two first parameters + to add_handler/3:

+ + id => HandlerId + module => Module + +

These are read-only and cannot be changed in runtime.

+

Handler specific configuration data is inserted by the + handler callback itself, in a sub structure associated with + the field named config. See + the logger_std_h(3) + and logger_disk_log_h + manual pages for information about the specifc configuration + for these handlers.

+

See the + logger_formatter(3) manual page for + information about the default configuration for this + formatter.

+
+
@@ -248,6 +241,18 @@ logger:error("error happened because: ~p", [Reason]). % Without macro

+ + + +

Primary configuration data for Logger. The following + default values apply:

+ + level => info + filter_default => log + filters => [] + +
+
@@ -690,15 +695,30 @@ start(_, []) -> - + + + + + Add or update configuration data for the specified handler. + + + + + + +

Add or update configuration data for the specified handler. If the given Key already exists, its associated value will be changed - to Value. If it does not exist, it will + to the given value. If it does not exist, it will be added.

+

See the definition of + the + handler_config() type for more + information about the different parameters.

@@ -721,13 +741,18 @@ start(_, []) -> - + + + Add or update primary configuration data for Logger. + + +

Add or update primary configuration data for Logger. If the given Key already exists, its associated - value will be changed to Value. If it - does not exist, it will be added.

+ value will be changed to the given value. If it does not + exist, it will be added.

-- cgit v1.2.3