Log config

This commit is contained in:
Mr. Stallion 2020-07-01 09:33:36 -05:00
parent e9e1e8ef63
commit d86ca564cf
2 changed files with 7 additions and 6 deletions

View File

@ -302,8 +302,8 @@ function showPatchNotes(): void {
function onReady(): void {
const logLevel = (process.env.NODE_ENV === 'production') ? 'info' : 'silly';
log.transports.file.level = logLevel;
log.transports.console.level = logLevel;
log.transports.file.level = settings.risingSystemLogLevel || logLevel;
log.transports.console.level = settings.risingSystemLogLevel || logLevel;
log.transports.file.maxSize = 5 * 1024 * 1024;
log.info('Starting application.');

View File

@ -4,15 +4,16 @@ import log from 'electron-log'; //tslint:disable-line:match-default-export-name
import {GeneralSettings} from './common';
import Window from './Window.vue';
const params = <{[key: string]: string | undefined}>qs.parse(window.location.search.substr(1));
const settings = <GeneralSettings>JSON.parse(params['settings']!);
const logLevel = (process.env.NODE_ENV === 'production') ? 'info' : 'silly';
log.transports.file.level = logLevel;
log.transports.console.level = logLevel;
log.transports.file.level = settings.risingSystemLogLevel || logLevel;
log.transports.console.level = settings.risingSystemLogLevel || logLevel;
log.transports.file.maxSize = 5 * 1024 * 1024;
const params = <{[key: string]: string | undefined}>qs.parse(window.location.search.substr(1));
const settings = <GeneralSettings>JSON.parse(params['settings']!);
//tslint:disable-next-line:no-unused-expression
new Window({
el: '#app',