Log settings with environment variables

Official Content
This documentation is valid for:

What are Logs?

A Log or log history is a text file (that can be structured or unstructured) in which the events, actions, or changes that have been generated are recorded chronologically.

In general, Logs can be used for several things. For example, to Trace, Debug, or communicate diagnostics of an application.

Logs in GeneXus

The various GeneXus Logs can be configured at runtime, for example by using the Log level property and then doing a build.

To be able to modify some Logging Settings at Runtime in containerized environments, without having to build and deploy the WebApp, you can use the following environment variables:

Environment variables Description Values Availability
GX_LOG_LEVEL Configures how many details should be added to the log.
  • debug
  • all
  • info
  • warn
  • error
  • Java Generator (v18 U1)
  • .NET Generator (v18 U2)
GX_LOG_LEVEL_USER Configures the detail level of the Log when using the Log API (Log external object); this is independent of the detail level configured in the Log level property.
  • debug
  • all
  • info
  • warn
  • error
  • Java Generator (v18 U1)
  • .NET Generator (v18 U2)
GX_LOG_OUTPUT Indicates where to send the result of the Log Level property.
  • ConsoleAppender
    (Writes to SYSOUT)
  • RollingFile
    (Writes to File)
  • Java Generator (v18 U1)
  • .NET Generator (v18 U2)

Scope

Generators: Java, .NET

See Also

Application Configuration using Environment Variables in .NET and Java
Log output property
User Log level property
Log output property