mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
suppress messages from TypeORM migration and schema loading in production
This commit is contained in:
parent
3fecde29b5
commit
dd1969c800
1 changed files with 4 additions and 2 deletions
|
@ -98,6 +98,8 @@ pg.types.setTypeParser(20, Number);
|
||||||
export const dbLogger = new MisskeyLogger('db');
|
export const dbLogger = new MisskeyLogger('db');
|
||||||
|
|
||||||
const sqlLogger = dbLogger.createSubLogger('sql', 'gray');
|
const sqlLogger = dbLogger.createSubLogger('sql', 'gray');
|
||||||
|
const sqlMigrateLogger = sqlLogger.createSubLogger('migrate');
|
||||||
|
const sqlSchemaLogger = sqlLogger.createSubLogger('schema');
|
||||||
|
|
||||||
export type LoggerProps = {
|
export type LoggerProps = {
|
||||||
disableQueryTruncation?: boolean;
|
disableQueryTruncation?: boolean;
|
||||||
|
@ -179,7 +181,7 @@ class MyCustomLogger implements Logger {
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public logSchemaBuild(message: string) {
|
public logSchemaBuild(message: string) {
|
||||||
sqlLogger.info(message);
|
sqlSchemaLogger.debug(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
|
@ -198,7 +200,7 @@ class MyCustomLogger implements Logger {
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public logMigration(message: string) {
|
public logMigration(message: string) {
|
||||||
sqlLogger.info(message);
|
sqlMigrateLogger.debug(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue