mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Minor logging improvement, saving incoming data for debugging
This commit is contained in:
parent
e693dc0070
commit
8662e75abe
2 changed files with 5 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
||||||
/* ----------------------------------------------------------------------------
|
/* ----------------------------------------------------------------------------
|
||||||
|
|
||||||
Question Server
|
Question Server
|
||||||
GitLab: <https://gitlab.com/YourFriendlyNeighborhoodDealer/question-node-server>
|
GitLab: <https://gitlab.com/YourFriendlyNeighborhoodDealer/question-node-server>
|
||||||
|
|
||||||
|
@ -269,10 +268,10 @@ function ProcessIncomingRequest(data) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let towrite = logger.GetDateString() + "\n";
|
let towrite = logger.GetDateString() + "\n";
|
||||||
towrite += "------------------------------------------------------\n";
|
towrite += "------------------------------------------------------------------------------\n";
|
||||||
towrite += data
|
towrite += data
|
||||||
towrite += "\n------------------------------------------------------\n";
|
towrite += "\n------------------------------------------------------------------------------\n";
|
||||||
utils.WriteFile(towrite, recDataFile);
|
utils.AppendToFile(towrite, recDataFile);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.log("Error writing recieved data.");
|
logger.log("Error writing recieved data.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,7 +282,7 @@ if (startHTTPS && certsLoaded) {
|
||||||
logger.Log("Cert files does not exists, starting http only!", logger.GetColor("redbg"));
|
logger.Log("Cert files does not exists, starting http only!", logger.GetColor("redbg"));
|
||||||
}
|
}
|
||||||
logger.Log(msg, logger.GetColor("yellow"));
|
logger.Log(msg, logger.GetColor("yellow"));
|
||||||
logger.Log("Node version: " + process.version);
|
logger.Log("[STRT]: Node version: " + process.version);
|
||||||
|
|
||||||
function Log(req, toFile, sc) {
|
function Log(req, toFile, sc) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue