Merge branch 'master' of github.com:gradido/gradido into 1840-refactor-to-filter-object--sub-rename+filters-obj

This commit is contained in:
Wolfgang Huß 2022-05-31 11:01:46 +02:00
commit 56873b6f18
12 changed files with 52 additions and 15 deletions

View File

@ -4,7 +4,7 @@
"main": "index.js",
"author": "Moriz Wahl",
"version": "1.8.3",
"license": "MIT",
"license": "Apache License 2.0",
"private": false,
"scripts": {
"start": "node run/server.js",

View File

@ -13,6 +13,14 @@
{
"type": "dateFile",
"filename": "../logs/backend/apollo.log",
"pattern": "%d{ISO8601} %p %c %m",
"keepFileExt" : true,
"fileNameSep" : "_"
},
"backend":
{
"type": "dateFile",
"filename": "../logs/backend/backend.log",
"pattern": "%d{ISO8601} %p %c %X{user} %f:%l %m",
"keepFileExt" : true,
"fileNameSep" : "_"
@ -31,24 +39,52 @@
"level": "error",
"appender": "errorFile"
},
"out":
"out":
{
"type": "stdout",
"layout":
{
"type": "pattern", "pattern": "%d{ISO8601} %p %c %X{user} %f:%l %m"
}
}
},
"apolloOut":
{
"type": "stdout",
"layout":
{
"type": "pattern", "pattern": "%d{ISO8601} %p %c %m"
}
}
},
"categories":
"categories":
{
"default":
{
"appenders":
[
"out",
"errors"
],
"level": "debug",
"enableCallStack": true
},
"apollo":
{
"appenders":
[
"apollo",
"apolloOut",
"errors"
],
"level": "debug",
"enableCallStack": true
},
"backend":
{
"appenders":
[
"backend",
"out",
"errors"
],
"level": "debug",

View File

@ -5,7 +5,7 @@
"main": "src/index.ts",
"repository": "https://github.com/gradido/gradido/backend",
"author": "Ulf Gebhardt",
"license": "MIT",
"license": "Apache License 2.0",
"private": false,
"scripts": {
"build": "tsc --build",

View File

@ -3,7 +3,7 @@ import CONFIG from './index'
describe('config/index', () => {
describe('decay start block', () => {
it('has the correct date set', () => {
expect(CONFIG.DECAY_START_TIME).toEqual(new Date('2021-05-13 17:46:31'))
expect(CONFIG.DECAY_START_TIME).toEqual(new Date('2021-05-13 17:46:31-0000'))
})
})
})

View File

@ -11,7 +11,7 @@ Decimal.set({
const constants = {
DB_VERSION: '0036-unique_previous_in_transactions',
DECAY_START_TIME: new Date('2021-05-13 17:46:31'), // GMT+0
DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
LOG4JS_CONFIG: 'log4js-config.json',
// default log level on production should be info
LOG_LEVEL: process.env.LOG_LEVEL || 'info',

View File

@ -12,7 +12,6 @@ log4js.configure(options)
const apolloLogger = log4js.getLogger('apollo')
const backendLogger = log4js.getLogger('backend')
apolloLogger.addContext('user', 'unknown')
backendLogger.addContext('user', 'unknown')
export { apolloLogger, backendLogger }

View File

@ -32,16 +32,16 @@ const logPlugin = {
requestDidStart(requestContext: any) {
const { logger } = requestContext
const { query, mutation, variables } = requestContext.request
logger.trace(`Request:
logger.info(`Request:
${mutation || query}variables: ${JSON.stringify(filterVariables(variables), null, 2)}`)
return {
willSendResponse(requestContext: any) {
if (requestContext.context.user) logger.trace(`User ID: ${requestContext.context.user.id}`)
if (requestContext.context.user) logger.info(`User ID: ${requestContext.context.user.id}`)
if (requestContext.response.data)
logger.trace(`Response-Data:
logger.info(`Response-Data:
${JSON.stringify(requestContext.response.data, null, 2)}`)
if (requestContext.response.errors)
logger.trace(`Response-Errors:
logger.error(`Response-Errors:
${JSON.stringify(requestContext.response.errors, null, 2)}`)
return requestContext
},

View File

@ -5,7 +5,7 @@
"main": "src/index.ts",
"repository": "https://github.com/gradido/gradido/database",
"author": "Ulf Gebhardt",
"license": "MIT",
"license": "Apache License 2.0",
"private": false,
"scripts": {
"build": "mkdir -p build/src/config/ && cp src/config/*.txt build/src/config/ && tsc --build",

View File

@ -0,0 +1 @@
<mxfile host="Electron" modified="2022-05-23T15:29:00.513Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/16.0.2 Chrome/96.0.4664.55 Electron/16.0.5 Safari/537.36" etag="IpEbe50ld79E_2HLyFXN" version="16.0.2" type="device"><diagram id="LWCFUfVkWozhiXBGj4Ze" name="Page-1">7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WC2aEhjdozRZyzKlAwXPeGs8YJ79BHxV1TsSFihnbqGjcyZ7qmRynoHOb29esib6gVUXxBqUiHw2jFM1T8piNT3aMwWVJMmZCsLgSF20SFL+h3Ombrg6oae9BVL3tGw4ESiKYQUEVvdr7hg0OZDQ4UP11iEJ6SJDAYxkCqeZHLVDMkeZaonCtB7GGXFt3L1UQP7QKjiiJEmhSPJXdJJAkQPRSiWMShpvEvqmP32RqV04h+aYM5OyojiuiD2Nzx/ADNpzIxdaFsU6gbRZt+JHqXACNhuEjkrkPBodcYumUsJAIJNDjNlwO8r23fDnurrc3OuA+/3tXRsk3qUq4L1LMH6DTGe7W4fZ6h9vU4A5KX5IPFL4jz9h3gv3oQOw721rzjtla64ZlF0XBLUO+rxDkzj+MTOtDUON8mAdvuv1ZlC8kHGcERIVsOyywvjWzDbkyLRs1peW8Y/s465ur52X4HanY3BG1u2lXM+CdrcN6RbeyDofA9c/Id4B8AwM7LfKWXu0I5DkkHD4g0THkQq7Px+NdB6lF/DvDu4F1NeJteV3h7Wl4xzhmZ6TbRto0vb6h9jWoUQxc+RzW7YPtWD2Dbep5PGYh5kiwM23rCnVv2PfqrVfge6if/I0BPzoQ+u6yu14hB+inhMdn6tYJ5PBd3jPktl4cLyB/XJ8hbx1yt2+67uh0vZLgT7AR9jfi7vfN3R2du3P8hANxjvSOKnB9E3jvmHNknW+HmP7gDRsiXZ8f8g7dJen3iLx/BJItojbo63TfwfBsstvpD1ZX91k857WT1VV9Vx3X6fRodW7DUuK/xzApQ77XMr7qlTp4KJmn0oe6P4JWP0HkmQ0EqekI2rCzXWT9C/hHivmfvhPZApZm/S8HjIZPWqcBy86OE/qN3zfn0yCt1LK8N5/8agS/s1KWr285k2m2JkQppDWOd+J+xF/A5y4QgM0kUdntBE05tbpWZxBtzgRYfkuxuT0Hl6PTdFLTbAceaBb/MmGzjBX/eMK+/g8=</diagram></mxfile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -99,5 +99,6 @@
"not ie <= 10"
],
"author": "Gradido-Akademie - https://www.gradido.net/",
"license": "Apache License 2.0",
"description": "Gradido, the Natural Economy of Life, is a way to worldwide prosperity and peace in harmony with nature. - Gradido, die Natürliche Ökonomie des lebens, ist ein Weg zu weltweitem Wohlstand und Frieden in Harmonie mit der Natur."
}

View File

@ -5,7 +5,7 @@
"main": "index.js",
"repository": "git@github.com:gradido/gradido.git",
"author": "Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>",
"license": "MIT",
"license": "Apache License 2.0",
"scripts": {
"release": "scripts/release.sh"
},