feat: decouple l-s entrypoint
This commit is contained in:
parent
2a2c1fccc8
commit
f4d6b5e454
48 changed files with 411 additions and 232 deletions
|
|
@ -1,9 +1,11 @@
|
|||
const winston = require('winston')
|
||||
const Postgres = require('./pg-transport')
|
||||
const options = require('./options')
|
||||
const { PSQL_URL } = require('./constants')
|
||||
|
||||
const LOG_LEVEL = process.env.LOG_LEVEL
|
||||
|
||||
const logger = new winston.Logger({
|
||||
level: options.logLevel,
|
||||
level: LOG_LEVEL,
|
||||
transports: [
|
||||
new (winston.transports.Console)({
|
||||
timestamp: true,
|
||||
|
|
@ -12,7 +14,7 @@ const logger = new winston.Logger({
|
|||
humanReadableUnhandledException: true
|
||||
}),
|
||||
new Postgres({
|
||||
connectionString: options.postgresql,
|
||||
connectionString: PSQL_URL,
|
||||
tableName: 'server_logs',
|
||||
handleExceptions: true,
|
||||
humanReadableUnhandledException: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue