- Help Center
- Diarkis Server
- Development
Logging
Diarkis server has its own logger with logging level control and other features.
Below are the configurations for the Diarkis server logger and its usage.
Configurations
The logger can be fed with a configuration JSON file.
level | string | Controls log level. See below for more details on log levels. |
timeZone | string | Valid values are "local" and "utc". Default is "utc". |
color | bool | Controls color of log output. |
flat | bool | Removes linebreaks from stack traces. |
Log Levels
Name | Configuration Value |
Fatal | fatal |
Error | error |
Warn | warn |
Notice | notice |
Info | info |
Debug | debug |
System | sys |
Verbose | verbose |
How To Load Configuration JSON file
// import "github.com/Diarkis/diarkis/log" // Add the code below to your main function BEFORE diarkis.Start() log.Setup("path/to/your/log/config.json") |