Creates a new instance of this logger.
Closes component and frees used resources.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Configures component by passing configuration parameters.
configuration parameters to be set.
Checks if the component is opened.
true if the component has been opened and false otherwise.
Opens the component.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Saves log messages from the cache.
a list with log messages
callback function that receives error or null for success.
Sets references to dependent components.
references to locate the component dependencies.
Writes a log message to the logger destination.
a log level.
(optional) transaction id to trace execution through call chain.
a human-readable message to log.
Generated using TypeDoc
Logger that writes log messages to AWS Cloud Watch Log.
Configuration parameters
References
*:context-info:*:*:1.0
(optional) ContextInfo to detect the context id and specify counters source*:discovery:*:*:1.0
(optional) IDiscovery services to resolve connections*:credential-store:*:*:1.0
(optional) Credential stores to resolve credentialsCounter (in the Pip.Services components package)
CachedCounters (in the Pip.Services components package)
CompositeLogger (in the Pip.Services components package)
Example
let logger = new Logger(); logger.config(ConfigParams.fromTuples( "stream", "mystream", "group", "mygroup", "connection.region", "us-east-1", "connection.access_id", "XXXXXXXXXXX", "connection.access_key", "XXXXXXXXXXX" )); logger.setReferences(References.fromTuples( new Descriptor("pip-services", "logger", "console", "default", "1.0"), new ConsoleLogger() )); logger.open("123", (err) => { ... }); logger.setLevel(LogLevel.debug); logger.error("123", ex, "Error occured: %s", ex.message); logger.debug("123", "Everything is OK.");