forked from ppfun/pixelplanet
add timestamp to pixelLogger
This commit is contained in:
parent
30c27c013c
commit
0bd61e9edc
|
@ -148,7 +148,8 @@ export async function drawByOffsets(
|
|||
);
|
||||
|
||||
pixelLogger.info(
|
||||
`${user.ip} ${user.id} ${canvasId} ${x} ${y} ${z} ${color} ${setColor}`,
|
||||
// eslint-disable-next-line max-len
|
||||
`${startTime} ${user.ip} ${user.id} ${canvasId} ${x} ${y} ${z} ${color} ${setColor}`,
|
||||
);
|
||||
|
||||
const clrIgnore = canvas.cli || 0;
|
||||
|
|
|
@ -23,9 +23,7 @@ export const pixelLogger = createLogger({
|
|||
format: format.printf(({ message }) => message),
|
||||
transports: [
|
||||
new DailyRotateFile({
|
||||
level: 'info',
|
||||
filename: './log/pixels-%DATE%.log',
|
||||
maxSize: '20m',
|
||||
maxFiles: '14d',
|
||||
colorize: false,
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue
Block a user