Add target to the list of targets
The transport target options to add
The current Targets instance for chaining
Conditionally add target to the list targets. The target will only be added
if the conditional is true.
targets.if(process.env.NODE_ENV === 'development', {
target: 'pino-pretty'
})
Condition to check before adding the target
The transport target options or factory function
The current Targets instance for chaining
Conditionally add target to the list targets. The target will only be added
unless the conditional is true.
targets.unless(process.env.NODE_ENV === 'production', {
target: 'pino-pretty'
})
Condition to check before adding the target
The transport target options or factory function
The current Targets instance for chaining
Get targets array
Array of transport target options
Exposes the API to construct targets array conditionally.