refs #5541 NPM upgraded, created date UTC fix
gitea/mylogger/pipeline/head This commit looks good
Details
gitea/mylogger/pipeline/head This commit looks good
Details
This commit is contained in:
parent
16e15e739b
commit
8be905fea9
|
@ -13,7 +13,7 @@ RUN apt-get update \
|
||||||
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
|
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
|
||||||
&& apt-get install -y --no-install-recommends nodejs \
|
&& apt-get install -y --no-install-recommends nodejs \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& npm i -g npm@9.5.0
|
&& npm i -g npm@9.6.4
|
||||||
|
|
||||||
# MyLogger
|
# MyLogger
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
code: mylogger
|
code: mylogger
|
||||||
debug: false
|
debug: false
|
||||||
testMode: false
|
testMode: false
|
||||||
pingInterval: 3600
|
pingInterval: 300
|
||||||
flushInterval: 30
|
flushInterval: 30
|
||||||
restartTimeout: 30
|
restartTimeout: 30
|
||||||
queueFlushDelay: 200
|
queueFlushDelay: 200
|
||||||
|
|
11
mylogger.js
11
mylogger.js
|
@ -613,12 +613,21 @@ module.exports = class MyLogger {
|
||||||
break;
|
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 modelName = tableInfo.modelName;
|
||||||
const modelId = row[tableInfo.idName];
|
const modelId = row[tableInfo.idName];
|
||||||
const modelValue = tableInfo.showField
|
const modelValue = tableInfo.showField
|
||||||
? row[tableInfo.showField] || null
|
? row[tableInfo.showField] || null
|
||||||
: null;
|
: null;
|
||||||
const created = new Date(evt.timestamp);
|
|
||||||
const oldInstance = oldI ? JSON.stringify(oldI) : null;
|
const oldInstance = oldI ? JSON.stringify(oldI) : null;
|
||||||
const originFk = !tableInfo.isMain
|
const originFk = !tableInfo.isMain
|
||||||
? row[tableInfo.relation]
|
? row[tableInfo.relation]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mylogger",
|
"name": "mylogger",
|
||||||
"version": "0.1.2",
|
"version": "0.1.3",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "MySQL and MariaDB logger using binary log",
|
"description": "MySQL and MariaDB logger using binary log",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue