Tidy up more log messages
This commit is contained in:
parent
21d0ad9e59
commit
a48f2b4067
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue