AdvLog
From ESS-WIKI
Revision as of 06:30, 1 July 2016 by Scott68.chang (talk | contribs) (Created page with "=Config File Format= Config file is in JSON Format: <source lang="c"> { "default": { "path": "./logs", "limit": 102400, "static": {...")
Config File Format
Config file is in JSON Format:
{
"default": {
"path": "./logs",
"limit": 102400,
"static": {
"level": 5,
"information": 1
},
"dynamic": {
"level": 5,
"information": 0,
"hide": ""
}
}
}
- [path]: set log files path (default:./logs)
- [limit]: set file max size (unit: byte)(default:102400)
- [static/dynamic]: static is the settings group of write to log file. dynamic is the group of display on console.
- [level]: Set log level (default:5)(negative means gray mode),
- 1:Fatal
- 2:Error
- 3:Warning
- 4:Notice
- 5:Info(Normal)
- 7:Debug
- [information]: Enable DYNAMIC/STATIC Flag(default:0)
- 0:disable
- 1:enable
- [hide]:Hide DYNAMIC message (default:"", example:"1,3,5" to hide level 1, 3 and 5 message)
Output Format
Default output format is html file:
<!DOCTYPE html><html><head><style type="text/css">body{color:white;background-color:black}log{display:block;}red>script{color:red;background-color:black}red{color:red;background-color:black}green>script{color:green;background-color:black}green{color:green;background-color:black}yellow>script{color:yellow;background-color:black}yellow{color:yellow;background-color:black}blue>script{color:#1569C7;background-color:black}blue{color:#1569C7;background-color:black}purple>script{color:purple;background-color:black}purple{color:purple;background-color:black}cyan>script{color:cyan;background-color:black}cyan{color:cyan;background-color:black}gray{color:#1C1C1C;background-color:black}redbg>script{color:white;background-color:red}redbg{color:white;background-color:red}greenbg>script{color:white;background-color:green}greenbg{color:white;background-color:green}yellowbg>script{color:black;background-color:yellow}yellowbg{color:black;background-color:yellow}bluebg>script{color:white;background-color:blue}bluebg{color:white;background-color:blue}purplebg>script{color:white;background-color:purple}purplebg{color:white;background-color:purple}cyanbg>script{color:black;background-color:cyan}cyanbg{color:black;background-color:cyan}whitebg>script{color:black;background-color:white}whitebg{color:black;background-color:white}script{display:block;}</style></head><body><pre><log><code> general> Initialize
</code><gray> [2016/06/29 16:27:42] [INFO] (.\SAGeneralHandler.c,General_Initialize,327)</gray>
</log><log><script type="text/plain"> general>Recv Topic [/cagent/admin/0000000BAB4231C8/agentcallbackreq] Data {"susiCommData":{"commCmd":2051,"requestID":0,"agentID":"","handlerName":"general","sendTS":1467188865}}
</script><gray> [2016/06/29 16:27:45] [INFO] (.\SAGeneralHandler.c,General_HandleRecv,372)</gray>
</log><log><script type="text/plain"> general>Recv Topic [/cagent/admin/0000000BAB4231C8/agentcallbackreq] Data {"susiCommData":{"requestItems":{},"commCmd":2056,"requestID":0,"agentID":"","handlerName":"general","sendTS":1467188865}}
</script><gray> [2016/06/29 16:27:45] [INFO] (.\SAGeneralHandler.c,General_HandleRecv,372)</gray>
</log></pre></body></html>