mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 17:44:44 +02:00
add machine logs back
This commit is contained in:
parent
845d65ad33
commit
7252876768
1 changed files with 16 additions and 0 deletions
|
@ -30,6 +30,22 @@ if (config.app.save_logs) {
|
|||
symlinkName: "pangolin.log"
|
||||
})
|
||||
);
|
||||
transports.push(
|
||||
new winston.transports.DailyRotateFile({
|
||||
filename: path.join(APP_PATH, "logs", ".machinelogs-%DATE%.json"),
|
||||
datePattern: "YYYY-MM-DD",
|
||||
zippedArchive: true,
|
||||
maxSize: "20m",
|
||||
maxFiles: "1d",
|
||||
createSymlink: true,
|
||||
symlinkName: ".machinelogs.json",
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
winston.format.splat(),
|
||||
winston.format.json()
|
||||
)
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
const logger = winston.createLogger({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue