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,6 +1,5 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
|
||||
Question Server
|
||||
Question Server
|
||||
GitLab: <https://gitlab.com/YourFriendlyNeighborhoodDealer/question-node-server>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -269,10 +268,10 @@ function ProcessIncomingRequest(data) {
|
|||
|
||||
try {
|
||||
let towrite = logger.GetDateString() + "\n";
|
||||
towrite += "------------------------------------------------------\n";
|
||||
towrite += "------------------------------------------------------------------------------\n";
|
||||
towrite += data
|
||||
towrite += "\n------------------------------------------------------\n";
|
||||
utils.WriteFile(towrite, recDataFile);
|
||||
towrite += "\n------------------------------------------------------------------------------\n";
|
||||
utils.AppendToFile(towrite, recDataFile);
|
||||
} catch (e) {
|
||||
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(msg, logger.GetColor("yellow"));
|
||||
logger.Log("Node version: " + process.version);
|
||||
logger.Log("[STRT]: Node version: " + process.version);
|
||||
|
||||
function Log(req, toFile, sc) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue