mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00: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
1 changed files with 7 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue