From 00a0e131b45bf2c5d4eeed5b5f6c3093a73a1238 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 11 Nov 2018 01:58:49 -0700 Subject: [PATCH] Statlog to config --- core/user_login.js | 9 ++++++++- misc/config_template.in.hjson | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/core/user_login.js b/core/user_login.js index e64d20a9..a3b2089b 100644 --- a/core/user_login.js +++ b/core/user_login.js @@ -92,7 +92,14 @@ function userLogin(client, username, password, cb) { userId : user.userId, sessionId : user.sessionId, }); - return StatLog.appendSystemLogEntry('user_login_history', historyItem, loginHistoryMax, StatLog.KeepType.Max, callback); + + return StatLog.appendSystemLogEntry( + 'user_login_history', + historyItem, + loginHistoryMax, + StatLog.KeepType.Max, + callback + ); } ], err => { diff --git a/misc/config_template.in.hjson b/misc/config_template.in.hjson index 731f1965..e24b4e92 100644 --- a/misc/config_template.in.hjson +++ b/misc/config_template.in.hjson @@ -366,4 +366,11 @@ // see the documentation for more information! // } + + statLog: { + systemEvents: { + // Max login history event records kept. -1 = unlimited + loginHistoryMax: -1 + } + } } \ No newline at end of file