Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #253 from StomyPX/logging_adjustments
Browse files Browse the repository at this point in the history
Changed forwarded logs to Cyan, added warning for missing playerId
  • Loading branch information
mcottontensor authored Jun 8, 2023
2 parents 8b9c41b + d62e326 commit 5202ef6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SignallingWebServer/cirrus.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,9 @@ function logOutgoing(destName, msg) {

function logForward(srcName, destName, msg) {
if (config.LogVerbose)
console.logColor(logging.Green, "\x1b[37m%s -> %s\x1b[32m %s", srcName, destName, JSON.stringify(msg));
console.logColor(logging.Cyan, "\x1b[37m%s -> %s\x1b[36m %s", srcName, destName, JSON.stringify(msg));
else
console.logColor(logging.Green, "\x1b[37m%s -> %s\x1b[32m %s", srcName, destName, msg.type);
console.logColor(logging.Cyan, "\x1b[37m%s -> %s\x1b[36m %s", srcName, destName, msg.type);
}

let WebSocket = require('ws');
Expand Down Expand Up @@ -475,6 +475,8 @@ function forwardStreamerMessageToPlayer(streamer, msg) {
delete msg.playerId;
logForward(streamer.id, playerId, msg);
player.sendTo(msg);
} else {
console.warning("No playerId specified, cannot forward message: %s", msg);
}
}

Expand Down

0 comments on commit 5202ef6

Please sign in to comment.