mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 15:49:10 +00:00
15 lines
369 B
TypeScript
15 lines
369 B
TypeScript
import { createLogger, Logger, transports, format } from 'winston';
|
|
|
|
const { combine, timestamp, errors, prettyPrint } = format;
|
|
|
|
const logger: Logger = createLogger({
|
|
format: combine(
|
|
errors({ stack: true }), // <-- use errors format
|
|
timestamp(),
|
|
prettyPrint()
|
|
),
|
|
transports: [new transports.Console()],
|
|
});
|
|
|
|
export default logger;
|