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:
parent
385c29f68d
commit
f5e157b147
2 changed files with 5 additions and 7 deletions
|
@ -272,13 +272,7 @@ function rotateLog() {
|
|||
'-' +
|
||||
('0' + (date.getMonth() + 1)).slice(-2) +
|
||||
'-' +
|
||||
('0' + date.getDate()).slice(-2) +
|
||||
' ' +
|
||||
('0' + date.getHours()).slice(-2) +
|
||||
':' +
|
||||
('0' + date.getMinutes()).slice(-2) +
|
||||
':' +
|
||||
('0' + date.getSeconds()).slice(-2)
|
||||
('0' + date.getDate()).slice(-2)
|
||||
|
||||
if (utils.FileExists(logFile)) {
|
||||
utils.CopyFile(logFile, logger.logDir + fname)
|
||||
|
@ -286,6 +280,9 @@ function rotateLog() {
|
|||
if (utils.FileExists(vlogFile)) {
|
||||
utils.CopyFile(vlogFile, logger.vlogDir + fname)
|
||||
}
|
||||
|
||||
utils.WriteFile(fname, logger.logDir + fname)
|
||||
utils.WriteFile(fname, logger.vlogDir + fname)
|
||||
}
|
||||
|
||||
function LogTimerAction() {
|
||||
|
|
|
@ -383,6 +383,7 @@ function log(text) {
|
|||
}
|
||||
|
||||
function writeInSameLine(text, returnToLineStart) {
|
||||
// TODO: clear line before
|
||||
process.stdout.write(text)
|
||||
if (returnToLineStart) {
|
||||
process.stdout.write('\r')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue