Create the targets array conditionally.
Construct options object for the file target.
Optional
Construct options object for the pino-pretty target.
Create the targets array conditionally.