mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
rog lotate fixes
This commit is contained in:
@@ -272,13 +272,7 @@ function rotateLog() {
|
|||||||
'-' +
|
'-' +
|
||||||
('0' + (date.getMonth() + 1)).slice(-2) +
|
('0' + (date.getMonth() + 1)).slice(-2) +
|
||||||
'-' +
|
'-' +
|
||||||
('0' + date.getDate()).slice(-2) +
|
('0' + date.getDate()).slice(-2)
|
||||||
' ' +
|
|
||||||
('0' + date.getHours()).slice(-2) +
|
|
||||||
':' +
|
|
||||||
('0' + date.getMinutes()).slice(-2) +
|
|
||||||
':' +
|
|
||||||
('0' + date.getSeconds()).slice(-2)
|
|
||||||
|
|
||||||
if (utils.FileExists(logFile)) {
|
if (utils.FileExists(logFile)) {
|
||||||
utils.CopyFile(logFile, logger.logDir + fname)
|
utils.CopyFile(logFile, logger.logDir + fname)
|
||||||
@@ -286,6 +280,9 @@ function rotateLog() {
|
|||||||
if (utils.FileExists(vlogFile)) {
|
if (utils.FileExists(vlogFile)) {
|
||||||
utils.CopyFile(vlogFile, logger.vlogDir + fname)
|
utils.CopyFile(vlogFile, logger.vlogDir + fname)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
utils.WriteFile(fname, logger.logDir + fname)
|
||||||
|
utils.WriteFile(fname, logger.vlogDir + fname)
|
||||||
}
|
}
|
||||||
|
|
||||||
function LogTimerAction() {
|
function LogTimerAction() {
|
||||||
|
@@ -383,6 +383,7 @@ function log(text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function writeInSameLine(text, returnToLineStart) {
|
function writeInSameLine(text, returnToLineStart) {
|
||||||
|
// TODO: clear line before
|
||||||
process.stdout.write(text)
|
process.stdout.write(text)
|
||||||
if (returnToLineStart) {
|
if (returnToLineStart) {
|
||||||
process.stdout.write('\r')
|
process.stdout.write('\r')
|
||||||
|
Reference in New Issue
Block a user