If you like my work, please consider supporting its development.

Nebula Forms features three levels of logging: standard, error, and debugging. The former two are always on and cannot be turned off through configuration. The latter is disabled by default but can be enabled to help determine the cause of unwanted behavior.

Logging Levels

The standard log level logs notable events, such as the server starting to listen for connections, each time a connection is received, and whether the submission was successfully handled.

The error log level logs all errors, both in the server itself and any generated while handling form submissions. This includes any errors created using the Errorf functions inside of templates.

The debugging log level logs information about nearly every action the server takes, except while doing the actual handling of requests. This limitation is in part due to the plugin structure of the handlers and not wanting to add unnecessary dependencies to them.

Enable Debugging

To enable debugging output, set debug to true at the top level of your configuration file.

Logging to Files

Each log level is logged to stdout (stderr for errors) by default as well as to files in system-default locations. These locations can be customized by setting the following configuration options at the top level of the configuration file:

  • log_file: The standard log file. Debugging output is printed here when debugging is enabled.
  • error_file: The error log file.