-
Notifications
You must be signed in to change notification settings - Fork 2
Logs
Create a directory named logs to launch the WebScripts Server. If logs directory does not exists or is not a directory, the WebScripts Server will try to create it.
mkdir logsThe logs level is "0" (all logs are written). You can change the logging level in configuration files or by using command line arguments.
Recommended: In production (for security reasons) the log level should be 0 or DEBUG.
The WebScripts Server use six differents levels:
- Value:
50, isCRITICAL - Value:
40, isERROR - Value:
30, isWARNING - Value:
20, isINFO - Value:
10, isDEBUG - Value:
5, isTRACE
-
console: print logs with level greater thanDEBUG(10)in stdout -
file: write logs with level greater thanDEBUG(10)inlogs/00-server.logs -
log_trace: write logsTRACEinlogs/05-trace.logs -
log_debug: write logsDEBUGinlogs/10-debug.logs -
log_info: write logsINFOinlogs/20-info.logs -
log_warning: write logsWARNINGinlogs/30-warning.logs -
log_error: write logsERRORinlogs/40-error.logs -
log_critical: write logsCRITICALinlogs/50-critical.logs
If an exceptions is catched by the WebScripts Server, it will be written in console, file and log_error loggers.
In console logger i added terminal colors to quickly identify logs level:
-
DEBUGlogs are green -
INFOlogs are blue -
WARNINGlogs are yellow -
ERRORlogs are purple -
CRITICALlogs are red
On linux WebScripts logs with level DEBUG, INFO, WARNING, ERROR and CRITICAL are redirected in syslog.
On Windows if pywin32 is installed logs with level DEBUG, INFO, WARNING, ERROR and CRITICAL are redirected in EventViewer.