mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 03:35:12 +00:00
revert accidental change to postgres.ts
This commit is contained in:
parent
e3c79b0c83
commit
24fd35e03d
1 changed files with 1 additions and 9 deletions
|
@ -92,8 +92,6 @@ export const dbLogger = new MisskeyLogger('db');
|
|||
const sqlLogger = dbLogger.createSubLogger('sql', 'gray');
|
||||
|
||||
class MyCustomLogger implements Logger {
|
||||
private readonly isDevelopment = process.env.NODE_ENV === 'development';
|
||||
|
||||
@bindThis
|
||||
private highlight(sql: string) {
|
||||
return highlight.highlight(sql, {
|
||||
|
@ -103,13 +101,7 @@ class MyCustomLogger implements Logger {
|
|||
|
||||
@bindThis
|
||||
public logQuery(query: string, parameters?: any[]) {
|
||||
let message = this.highlight(query);
|
||||
|
||||
if (!this.isDevelopment) {
|
||||
message = message.substring(0, 100);
|
||||
}
|
||||
|
||||
sqlLogger.info(message);
|
||||
sqlLogger.info(this.highlight(query).substring(0, 100));
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
|
Loading…
Reference in a new issue