Classes
Members
(inner, constant) appLogger :ProviderCreator.<AppLoggerProviderOptions>
- Source:
- Tutorials:
The service provider to register an instance of Logger
with the package name as
messages prefix on the container.
Type:
(inner, constant) logger :ProviderCreator.<LoggerProviderOptions>
- Source:
- Tutorials:
The service provider to register an instance of Logger
on the container.
Type:
Type Definitions
AppLoggerProviderOptions
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
serviceName |
string | The name that will be used to register an
instance of |
|
services |
AppLoggerServiceMap | A dictionary with the services that need to be injected. |
|
showTime |
boolean |
<optional> |
Whether or not to show the time on each message. |
Type:
AppLoggerServiceMap
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
packageInfo |
string | PackageInfo |
<optional> |
The name of the service that containers
the information of the |
Type:
LoggerLine
- Source:
This can be either a message to log, or an array where the first item is the message and the second one is the color it should be used to log it.
Type:
Example
logger.log('hello world');
// It will log 'hello world' with the default color.
logger.log(['hello world', 'red']);
// It will log 'hello world' in red.
LoggerMessage
- Source:
Type:
- string | Array.<LoggerLine>
LoggerProviderOptions
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
serviceName |
string | The name that will be used to register an
instance of |
|
messagesPrefix |
string |
<optional> |
A prefix to include in front of all the messages. |
showTime |
boolean |
<optional> |
Whether or not to show the time on each message. |
Type:
PackageInfo
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
nameForCLI |
string |
<optional> |
A specific name to use on the logger; it overwrites
|
name |
string | The package name. |