refs #5541 NPM upgraded, created date UTC fix
gitea/mylogger/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2023-04-11 16:17:26 +02:00
parent 16e15e739b
commit 8be905fea9
4 changed files with 13 additions and 4 deletions

View File

@ -13,7 +13,7 @@ RUN apt-get update \
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/* \
&& npm i -g npm@9.5.0
&& npm i -g npm@9.6.4
# MyLogger

View File

@ -1,7 +1,7 @@
code: mylogger
debug: false
testMode: false
pingInterval: 3600
pingInterval: 300
flushInterval: 30
restartTimeout: 30
queueFlushDelay: 200

View File

@ -613,12 +613,21 @@ module.exports = class MyLogger {
break;
}
let created = new Date(evt.timestamp);
created = Date.UTC(
created.getFullYear(),
created.getMonth(),
created.getDate(),
created.getHours(),
created.getMinutes(),
created.getSeconds()
);
const modelName = tableInfo.modelName;
const modelId = row[tableInfo.idName];
const modelValue = tableInfo.showField
? row[tableInfo.showField] || null
: null;
const created = new Date(evt.timestamp);
const oldInstance = oldI ? JSON.stringify(oldI) : null;
const originFk = !tableInfo.isMain
? row[tableInfo.relation]

View File

@ -1,6 +1,6 @@
{
"name": "mylogger",
"version": "0.1.2",
"version": "0.1.3",
"author": "Verdnatura Levante SL",
"description": "MySQL and MariaDB logger using binary log",
"license": "GPL-3.0",