mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-01 23:41:57 +02:00
* Fixed some logging of client IP addresses/etc.
* Some updates to FSE work for position and edit mode display * Use cursor save/restore for some things vs internal tracking
This commit is contained in:
parent
3d5d21bcb5
commit
7c0446bf79
5 changed files with 51 additions and 22 deletions
20
core/bbs.js
20
core/bbs.js
|
@ -159,8 +159,6 @@ function startListening() {
|
|||
|
||||
addNewClient(client);
|
||||
|
||||
//logger.log.info({ clientId : client.runtime.id, from : client.address(), server : module.moduleInfo.name }, 'Client connected');
|
||||
|
||||
client.on('ready', function onClientReady() {
|
||||
// Go to module -- use default error handler
|
||||
prepareClient(client, function onPrepared() {
|
||||
|
@ -198,20 +196,14 @@ function addNewClient(client) {
|
|||
// Create a client specific logger
|
||||
client.log = logger.log.child( { clientId : id } );
|
||||
|
||||
// :TODO: if client.log concept is kept, clean this up to use it:
|
||||
var connInfo = { ip : client.input.remoteAddress };
|
||||
|
||||
var connInfo = {
|
||||
connectionCount : clientConnections.length,
|
||||
clientId : client.runtime.id,
|
||||
};
|
||||
|
||||
if(logger.log.debug()) {
|
||||
connInfo.address = client.address();
|
||||
} else {
|
||||
connInfo.ip = client.address().address;
|
||||
if(client.log.debug()) {
|
||||
connInfo.port = client.input.localPort;
|
||||
connInfo.family = client.input.localFamily;
|
||||
}
|
||||
|
||||
logger.log.info(connInfo, 'Client connected');
|
||||
|
||||
client.log.info(connInfo, 'Client connected');
|
||||
|
||||
return id;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue