Upload signaling server
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import winston from "winston";
|
||||
import path from "path";
|
||||
import config from "../config/config";
|
||||
|
||||
const logger = winston.createLogger({
|
||||
levels: winston.config.syslog.levels,
|
||||
level: process.env.LOG_LEVEL || config.logger.level,
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp({
|
||||
format: config.logger.timestamp_format,
|
||||
}),
|
||||
winston.format.printf((info) => `[${info.timestamp}][${info.level}]: ${info.message}`)
|
||||
),
|
||||
transports: [
|
||||
new winston.transports.File({ filename: path.join(path.dirname(process.cwd()), config.logger.error_path), level: "error", }),
|
||||
new winston.transports.File({ filename: path.join(path.dirname(process.cwd()), config.logger.full_path) }),
|
||||
new winston.transports.Console()
|
||||
],
|
||||
});
|
||||
|
||||
export default logger;
|
||||
Reference in New Issue
Block a user