Tidy up more log messages

This commit is contained in:
Bryan Ashby 2022-08-13 11:51:11 -06:00
parent 21d0ad9e59
commit a48f2b4067
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
4 changed files with 12 additions and 7 deletions

View File

@ -513,7 +513,7 @@ Client.prototype.startIdleMonitor = function () {
idleLogoutSeconds > 0 &&
nowMs - this.lastActivityTime >= idleLogoutSeconds * 1000
) {
this.emit('idle timeout');
this.emit('idle timeout', idleLogoutSeconds);
}
}, 1000 * 60);
};

View File

@ -44,7 +44,7 @@ function ClientTerminal(output) {
if (iconv.encodingExists(enc)) {
Log.info(
{ encoding: enc, currentEncoding: outputEncoding },
'Setting client encoding.'
`Output encoding changed to ${enc}`
);
outputEncoding = enc;
} else {

View File

@ -10,6 +10,7 @@ const UserProps = require('./user_property.js');
// deps
const _ = require('lodash');
const moment = require('moment');
module.exports = class LoginServerModule extends ServerModule {
constructor() {
@ -87,8 +88,12 @@ module.exports = class LoginServerModule extends ServerModule {
clientConns.removeClient(client);
});
client.on('idle timeout', () => {
client.log.info('User idle timeout expired');
client.on('idle timeout', idleLogoutSeconds => {
client.log.info(
`Node ${client.node} idle timeout (${moment
.duration(idleLogoutSeconds, 'seconds')
.humanize()}) expired; Kicking`
);
client.menuStack.goto('idleLogoff', err => {
if (err) {

View File

@ -363,7 +363,7 @@ function changeMessageConference(client, confTag, cb) {
if (!err) {
client.log.info(
{ confTag: confTag, confName: conf.name, areaTag: areaInfo.areaTag },
'Current message conference changed'
`${client.node} changed message conference to ${areaInfo.areaTag}`
);
} else {
client.log.warn(
@ -412,9 +412,9 @@ function changeMessageAreaWithOptions(client, areaTag, options, cb) {
],
function complete(err, area) {
if (!err) {
client.log.info(
client.log.debug(
{ areaTag: areaTag, area: area },
'Current message area changed'
`Node ${client.node} changed message area to ${areaTag}`
);
} else {
client.log.warn(