26.2-pre-2
This commit is contained in:
1 parent
ea2a8c97ae
commit
762fcf45c3
26 files changed
+1252
-2963
No files matched your search
@@ -59,7 +59,16 @@ logTypes.forEach((type) => {
|
||||
function logToFile(type, data) {
|
||||
const date = new Date().toISOString().split("T")[0];
|
||||
const file = path.join(`./Logs/${type}`, `${type}-${date}.log`);
|
||||
fs.appendFileSync(file, `[${new Date().toISOString()}] ${data}\n`);
|
||||
const timestamp = new Date().toISOString();
|
||||
fs.appendFileSync(file, `[${timestamp}] ${data}\n`);
|
||||
|
||||
if (global.apiServer) {
|
||||
global.apiServer.broadcast("log", {
|
||||
type,
|
||||
timestamp,
|
||||
message: String(data)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const origLog = console.log;
|
||||
|
||||
Reference in new issue
Block a user