mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-13 16:03:20 -05:00
allow debug from config
allow debug to be set from config at config.settings.debug as with same options as argument
This commit is contained in:
parent
b62e555c58
commit
c4fb0c23e1
@ -796,9 +796,13 @@ function CreateMeshCentralServer(config, args) {
|
||||
}
|
||||
|
||||
// Local console tracing
|
||||
if (typeof obj.args.debug == 'string') { obj.debugSources = obj.args.debug.toLowerCase().split(','); }
|
||||
else if (typeof obj.args.debug == 'object') { obj.debugSources = obj.args.debug; }
|
||||
else if (obj.args.debug === true) { obj.debugSources = '*'; }
|
||||
var debugOptions = [obj.args.debug];
|
||||
if (config.settings.debug) { debugOptions.push(config.settings.debug) }
|
||||
debugOptions.forEach((option) => {
|
||||
if (typeof option == 'string') { obj.debugSources = option.toLowerCase().split(','); }
|
||||
else if (typeof option == 'object') { obj.debugSources = option; }
|
||||
else if (option === true) { obj.debugSources = '*'; }
|
||||
});
|
||||
|
||||
require('./db.js').CreateDB(obj,
|
||||
function (db) {
|
||||
|
Loading…
Reference in New Issue
Block a user