[MM-54170] Automatically set the logging level to info if not specified (#2811)
* [MM-54170] Automatically set the logging level to info if not specified * Fix test
This commit is contained in:
parent
80fcbf27c3
commit
06872452f4
|
@ -48,6 +48,7 @@ const defaultPreferences: ConfigV3 = {
|
|||
lastActiveTeam: 0,
|
||||
downloadLocation: getDefaultDownloadLocation(),
|
||||
startInFullscreen: false,
|
||||
logLevel: 'info',
|
||||
};
|
||||
|
||||
export default defaultPreferences;
|
||||
|
|
|
@ -10,6 +10,14 @@ jest.unmock('common/log');
|
|||
|
||||
jest.mock('electron-log', () => ({
|
||||
log: jest.fn(),
|
||||
transports: {
|
||||
file: {
|
||||
level: 'info',
|
||||
},
|
||||
console: {
|
||||
level: 'info',
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
jest.mock('common/utils/util', () => ({
|
||||
|
|
|
@ -22,6 +22,9 @@ export class Logger {
|
|||
|
||||
constructor(...prefixes: string[]) {
|
||||
this.prefixes = this.shortenPrefixes(...prefixes);
|
||||
|
||||
// Start on info by default
|
||||
setLoggingLevel('info');
|
||||
}
|
||||
|
||||
withPrefix = (...prefixes: string[]) => {
|
||||
|
|
Loading…
Reference in a new issue