Getting started Configuration Logging
Tuesday, December 1, 2020 11:08 AMLogging
Graphileon logs information both in the browser and the server.
Logs location
The frontend logs will be displayed only in the browser console. The backend logs, by default, are not written to the
file system, but can be configured to do so, by setting file
to true
.
If no folder
is configured, the default logging directory will be used,
in the Graphileon application data directory.
It can also be set to a string, pointing at a custom logging directory.
The log levels are respected, however, unexpected application errors are always logged.
Logging levels and modules
The amount of logging can be set granularly, per module. Each log entry starts with the module name, followed by the message. Additionally, each message has a log level.
- DEBUG: Low level debugging info, intended for development feedback.
- INFO: Neutral info messages about important processes.
- WARN: Warning messages indicating possible (future) problems.
- ERROR: Error messages indicating a part of the software or configuration is not working as intended.
- FATAL: Error messages indicating the Graphileon cannot continue functioning properly.
For each module, the log level can be set to one of these values, setting the minimal log level for a message to be
shown in the logs. For instance, setting a module's log level to WARN
, it will only show WARN
, ERROR
and FATAL
messages. Additionally, a module's log level can be set to:
- ALL: all log messages will be shown
- NONE: no log messages will be shown
Log levels for each module can be set in the config.json
, in the log
section:
"log": {
"levels": {
"default": "WARN",
"Function": "INFO",
"Trigger": "INFO",
"function/console": "ALL"
},
"folder": false,
"dateformat": "HH:MM:ss.L",
"format": "{{timestamp}} <{{title}}> {{message}}"
}
This section sets the default log level to WARN
(hiding INFO
and DEBUG
messages),
but sets the log levels of the Function and Triggers modules to INFO
. This will show information about processes in
Functions and Triggers in the console logs that can be useful for dashboard builders.
To get an overview of logging modules, the default log level can be set to ALL
. All messages will shown, prepended
with the module name. To change a module's log level, simply add it to the levels
object in the config, e.g.:
"NetworkView": "DEBUG"
Modules
Modules are hierarchical, so the logging level for modules under the same parent can be set on that parent.
For example, the log levels for server/core/config
, if not set specifically, will inherit the levels of server/core
or server
.
This is an overview of the logging modules.
server All server logging (terminal or file)
/core Core server activities
/config Configuration-related activities
/file File upload and serving
/license License management
/router API routing information
/session User session management
/store Graphileon store activities
/elasticsearch Elasticsearch store activities
/neo4j Neo4j store activities
/misc Miscellaneous
client All client-side logging (browser console)
/core Core application activities
/api API communication with server
/session User session management
/component Dynamic components in HtmlViews or MarkdownViews
/api API component
/ui UI management
/container Containers for Views
/viewmanager Management of Views and containers
/renderer Renderering of Views
/editor Text editors
function Function activities
/... All Graphileon Functions.*
/misc Miscellaneous Function-related activities
trigger Trigger activities
* For Function modules, the logging name is equal to the label of the Function, without prefix (case insensitive).
For example, the logging name for the NetworkView would be function/networkview
(Function/NetworkView
would also work).