medusa-extender / Exports / core/logger / Logger
core/logger.Logger
internal
Internal logger to display information about the build.
• new Logger(context
, app
)
Name | Type |
---|---|
context |
string |
app |
string |
• Private
Readonly
_app: string
• Private
Readonly
_context: string
• Private
logsQueue: any
[] = []
• get
app(): string
string
• get
context(): string
string
▸ Private
buildLog(color
, description
, ...variables
): Logger
Build logs taking in count the level color
Name | Type |
---|---|
color |
Chalk |
description |
string |
...variables |
string [] |
▸ error(description
, ...variables
): Logger
Display error logs in red immediately
Name | Type |
---|---|
description |
string |
...variables |
string [] |
▸ flush(): Logger
display all queues logs and then reset the queue.
▸ log(description
, ...variables
): Logger
Display log immediately.
Name | Type |
---|---|
description |
string |
...variables |
string [] |
▸ push(description
, ...variables
): Logger
Push new logs to queue and then show them later on.
Name | Type |
---|---|
description |
string |
...variables |
string [] |
▸ warn(description
, ...variables
): Logger
Display warning immediately.
Name | Type |
---|---|
description |
string |
...variables |
string [] |
▸ Static
contextualize(context
, app?
): Logger
Name | Type | Default value |
---|---|---|
context |
string |
undefined |
app |
string |
'Server' |