Write only error logs on production
All checks were successful
Bump deps (only minor versions) / ci (push) Successful in 21s
All checks were successful
Bump deps (only minor versions) / ci (push) Successful in 21s
This commit is contained in:
parent
652208aa57
commit
5b278b75c0
1 changed files with 2 additions and 1 deletions
|
@ -1,8 +1,9 @@
|
|||
import formats from '$lib/common/supportedFormats.json';
|
||||
import winston from 'winston';
|
||||
import { dev } from '$app/environment';
|
||||
|
||||
export const logger = winston.createLogger({
|
||||
level: 'debug',
|
||||
level: dev ? 'debug' : 'error',
|
||||
format: winston.format.json(),
|
||||
transports: [new winston.transports.Console()]
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue