Improve logging configuration structure
This commit is contained in:
parent
b736f5f6cb
commit
8210642684
@ -1,10 +1,13 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
app: {
|
||||
name: 'Example App',
|
||||
contact_email: 'contact@example.net'
|
||||
},
|
||||
log_level: "DEV",
|
||||
db_log_level: "ERROR",
|
||||
log: {
|
||||
level: "DEBUG",
|
||||
verbose: true,
|
||||
db_level: "ERROR",
|
||||
},
|
||||
base_url: "http://localhost:4899",
|
||||
public_websocket_url: "ws://localhost:4899",
|
||||
listen_addr: '127.0.0.1',
|
||||
|
@ -1,6 +1,9 @@
|
||||
module.exports = {
|
||||
log_level: "DEBUG",
|
||||
db_log_level: "ERROR",
|
||||
export default {
|
||||
log: {
|
||||
level: "DEV",
|
||||
verbose: false,
|
||||
db_level: "ERROR",
|
||||
},
|
||||
base_url: "https://watch-my.stream",
|
||||
public_websocket_url: "wss://watch-my.stream",
|
||||
session: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
mysql: {
|
||||
host: "localhost",
|
||||
user: "root",
|
||||
|
@ -4,9 +4,9 @@ import Log from "./models/Log";
|
||||
import {bufferToUUID} from "./Utils";
|
||||
|
||||
export default class Logger {
|
||||
private static logLevel: LogLevelKeys = <LogLevelKeys>config.get<string>('log_level');
|
||||
private static dbLogLevel: LogLevelKeys = <LogLevelKeys>config.get<string>('db_log_level');
|
||||
private static verboseMode: boolean = false;
|
||||
private static logLevel: LogLevelKeys = <LogLevelKeys>config.get<string>('log.level');
|
||||
private static dbLogLevel: LogLevelKeys = <LogLevelKeys>config.get<string>('log.db_level');
|
||||
private static verboseMode: boolean = config.get<boolean>('log.verbose');
|
||||
|
||||
public static verbose() {
|
||||
this.verboseMode = true;
|
||||
|
Loading…
Reference in New Issue
Block a user