Skip to content

Commit a9f2278

Browse files
committed
fix: log renderer logs to dev inspector, always
1 parent e97a18b commit a9f2278

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ts/util/logger/renderer_process_logging.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
type LogEntryType,
1818
} from './shared';
1919
import * as log from './log';
20-
import { isDevProd, isUnitTest } from '../../shared/env_vars';
20+
import { isUnitTest } from '../../shared/env_vars';
2121
import { Errors } from '../../types/Errors';
2222
import LIBSESSION_CONSTANTS from '../../session/utils/libsession/libsession_constants';
2323
import { buildPinoLogger } from './buildPinoLogger';
@@ -60,11 +60,9 @@ function now() {
6060
}
6161

6262
function logAtLevel(level: LogLevel, ...args: ReadonlyArray<unknown>): void {
63-
if (isDevProd()) {
64-
// we are in renderer, we log to the console tab, always
65-
const prefix = getLogLevelString(level).toUpperCase().padEnd(levelMaxLength, ' ');
66-
console._log(prefix, now(), ...args);
67-
}
63+
// we are in renderer, we log to the console tab, always
64+
const prefix = getLogLevelString(level).toUpperCase().padEnd(levelMaxLength, ' ');
65+
console._log(prefix, now(), ...args);
6866

6967
const levelString = getLogLevelString(level);
7068
const msg = cleanArgs(args);

0 commit comments

Comments
 (0)