add debug/log to schema file
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
8e5aa35bf3
commit
113adb5b85
|
@ -744,9 +744,15 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
|
"debug": {
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"description": "You can set this value in the format 'web,agent,relay', where each value is separated by a comma. Each specified value will output logs to the MeshCentral console. Setting it to '*' will output all logs."
|
||||||
|
},
|
||||||
"log": {
|
"log": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": null
|
"default": null,
|
||||||
|
"description": "You can set this value in the format 'web,agent,relay', where each value is separated by a comma. Each specified value will output logs to a file named 'log.txt' located inside the 'meshcentral-data' folder. Setting it to '*' will output all logs."
|
||||||
},
|
},
|
||||||
"syslog": {
|
"syslog": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|
|
@ -3846,7 +3846,7 @@ function CreateMeshCentralServer(config, args) {
|
||||||
// Send event to log file
|
// Send event to log file
|
||||||
if (obj.config.settings && obj.config.settings.log) {
|
if (obj.config.settings && obj.config.settings.log) {
|
||||||
if (typeof obj.args.log == 'string') { obj.args.log = obj.args.log.split(','); }
|
if (typeof obj.args.log == 'string') { obj.args.log = obj.args.log.split(','); }
|
||||||
if (obj.args.log.indexOf(source) >= 0) {
|
if ((obj.args.log.indexOf(source) >= 0) || (obj.args.log[0] == '*')) {
|
||||||
const d = new Date();
|
const d = new Date();
|
||||||
if (obj.xxLogFile == null) {
|
if (obj.xxLogFile == null) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -106,6 +106,7 @@
|
||||||
"_runOnServerUpdated": "c:\\tmp\\mcupdate.bat",
|
"_runOnServerUpdated": "c:\\tmp\\mcupdate.bat",
|
||||||
"_runOnServerError": "c:\\tmp\\mcerror.bat",
|
"_runOnServerError": "c:\\tmp\\mcerror.bat",
|
||||||
"_log": "main,web,webrequest,cert",
|
"_log": "main,web,webrequest,cert",
|
||||||
|
"_debug": "main,web,webrequest,cert",
|
||||||
"_syslog": "meshcentral",
|
"_syslog": "meshcentral",
|
||||||
"_syslogauth": "meshcentral-auth",
|
"_syslogauth": "meshcentral-auth",
|
||||||
"_syslogjson": "meshcentral-json",
|
"_syslogjson": "meshcentral-json",
|
||||||
|
|
Loading…
Reference in New Issue