Skip to content

createStream

createStream(): void

Initializes the file write streams defined in the logger configuration. If directories in the file paths do not exist, they will be created automatically.

const log = new Zylog({
streams: {
all: 'logs/app.log',
},
});
log.createStream();