feat: add new server log page
This commit is contained in:
parent
fc1951c4b2
commit
703c5d7c91
38 changed files with 2844 additions and 29 deletions
|
|
@ -1,11 +1,15 @@
|
|||
const winston = require('winston')
|
||||
const Postgres = require('./pg-transport')
|
||||
const options = require('./options')
|
||||
const _ = require('lodash/fp')
|
||||
|
||||
const logger = new winston.Logger({
|
||||
level: options.logLevel,
|
||||
transports: [
|
||||
new (winston.transports.Console)({ timestamp: true, colorize: true })
|
||||
new (winston.transports.Console)({ timestamp: true, colorize: true }),
|
||||
new Postgres({
|
||||
connectionString: options.postgresql,
|
||||
tableName: 'server_logs'
|
||||
})
|
||||
],
|
||||
rewriters: [
|
||||
(...[,, meta]) => meta instanceof Error ? { message: meta.message, stack: meta.stack } : meta
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue