mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 05:55: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');
|
const sqlLogger = dbLogger.createSubLogger('sql', 'gray');
|
||||||
|
|
||||||
class MyCustomLogger implements Logger {
|
class MyCustomLogger implements Logger {
|
||||||
private readonly isDevelopment = process.env.NODE_ENV === 'development';
|
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
private highlight(sql: string) {
|
private highlight(sql: string) {
|
||||||
return highlight.highlight(sql, {
|
return highlight.highlight(sql, {
|
||||||
|
@ -103,13 +101,7 @@ class MyCustomLogger implements Logger {
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public logQuery(query: string, parameters?: any[]) {
|
public logQuery(query: string, parameters?: any[]) {
|
||||||
let message = this.highlight(query);
|
sqlLogger.info(this.highlight(query).substring(0, 100));
|
||||||
|
|
||||||
if (!this.isDevelopment) {
|
|
||||||
message = message.substring(0, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
sqlLogger.info(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
|
|
Loading…
Reference in a new issue