mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
use log levels in custom typeorm logger
This commit is contained in:
parent
efdbc4f345
commit
cbf58614c4
2 changed files with 2 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ export const appDataSource = new DataSource({
|
|||
entities: [__dirname + '/entity/**/*{.js,.ts}'],
|
||||
subscribers: [__dirname + '/events/**/*{.js,.ts}'],
|
||||
namingStrategy: new SnakeNamingStrategy(),
|
||||
logger: new CustomTypeOrmLogger(),
|
||||
logger: new CustomTypeOrmLogger(['query', 'info']),
|
||||
connectTimeoutMS: 40000, // 40 seconds
|
||||
maxQueryExecutionTime: 10000, // 10 seconds
|
||||
})
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export class CustomTypeOrmLogger
|
|||
private logger: Logger
|
||||
|
||||
constructor(options?: TypeOrmLoggerOptions) {
|
||||
super(false)
|
||||
super(options)
|
||||
this.logger = buildLogger('typeorm')
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue