Just as with a lot of other programs, rayjas has its own log files, wherein it writes about events, actions & errors that take place in its execution. The log files are the first point of inspection in case of execution issues. Rayjas generates two log files – rayjas.log and errors.log in the log directory of the dist for generic information logging and critical error messages respectively. Both files are located at the rayjas program root. The separation of the two files helps track down errors and events more efficiently.
Logging configuration – logging.json
{ "version": 1, "disable_existing_loggers": false, "formatters": { "simple": { "format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s" } }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", "formatter": "simple", "stream": "ext://sys.stdout" }, "info_file_handler": { "class": "logging.handlers.RotatingFileHandler", "level": "INFO", "formatter": "simple", "filename": "rayjas.log", "maxBytes": 20971520, "backupCount": 10, "encoding": "utf8" }, "error_file_handler": { "class": "logging.handlers.RotatingFileHandler", "level": "ERROR", "formatter": "simple", "filename": "errors.log", "maxBytes": 20971520, "backupCount": 10, "encoding": "utf8" } }, "root": { "level": "INFO", "handlers": ["console", "info_file_handler", "error_file_handler"] } }
Configuration Properties
Attribute | Description | Value Type | Default Value |
root | – | – | – |
root.level | Sets the default logging level for the entire application | INFO/DEBUG/ WARN | INFO |
root.handlers | An array of different logging handler configurations | – | – |
formatters | – | – | – |
formatters.simple | Default log statement formatter | – | – |
formatters.simple.format | Expression for default log formatter | – | %(asctime)s – %(name)s – %(levelname)s – %(message)s |
handlers | – | – | – |
handlers.info_file_handler | Handler configuration for info/debug/warn logging | – | – |
handlers.error_file_handler | Handler configuration for error logging | – | – |