From 8d95cb685504125544da28dad2ae5368cb6cb4ce Mon Sep 17 00:00:00 2001 From: kiduzk Date: Tue, 23 Apr 2024 23:41:42 -0400 Subject: [PATCH] Add rotate argument for log rotation --- packages/main/src/services/logger/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/main/src/services/logger/index.ts b/packages/main/src/services/logger/index.ts index 8f7504feff..258b5a0094 100644 --- a/packages/main/src/services/logger/index.ts +++ b/packages/main/src/services/logger/index.ts @@ -9,8 +9,9 @@ timber.hookConsole(); const errorLogStream = rts.createStream( path.join(app.getPath('userData'), 'logs', 'nuclear-error.log'), { - size: '5M', - compress: 'gzip' + size: '1M', + compress: 'gzip', + rotate: 5 // arbitrary value to specify the number of rotations } );