Add debug log in healthcheck and enable DB logging via environment (#2744)

*  add debug log in healthcheck

*  add DB logging

* CR
This commit is contained in:
Ahsan Virani
2022-02-01 11:27:08 +01:00
committed by GitHub
parent b487d4f392
commit 135d5a89cd
3 changed files with 45 additions and 2 deletions

View File

@@ -22,6 +22,26 @@ const config = convict({
default: '',
env: 'DB_TABLE_PREFIX',
},
logging: {
enabled: {
doc: 'Typeorm logging enabled flag.',
format: 'Boolean',
default: false,
env: 'DB_LOGGING_ENABLED',
},
options: {
doc: 'Logging level options, default is "error". Possible values: query,error,schema,warn,info,log. To enable all logging, specify "all"',
format: String,
default: 'error',
env: 'DB_LOGGING_OPTIONS',
},
maxQueryExecutionTime: {
doc: 'Maximum number of milliseconds query should be executed before logger logs a warning. Set 0 to disable long running query warning',
format: Number,
default: 1000,
env: 'DB_LOGGING_MAX_EXECUTION_TIME',
},
},
postgresdb: {
database: {
doc: 'PostgresDB Database',