Table of contents

Official Content

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, without having to build and deploy the WebApp, you can use the following environment variables:

Environment variables Description Values
GX_LOG_LEVEL

Configures how many details should be added to the log.

In case of Log output = Azure Application Insights or Observability Provider property = Azure Monitor Application Insights (this option uses Azure App Insights as Log provider also) you can also use the following values (which are equivalent to the ones at the right hand side column):
Trace = 0, Debug = 1, Information = 2, Warning = 3, Error = 4, Critical = 5, and None = 6.

  • debug
  • all
  • info
  • warn
  • error
  • fatal
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.

In case of NET generator, it does not apply for Log output = Azure Application Insights. In this case the Log API takes the same value as the one specified at the GX_LOG_LEVEL environment variable.

  • debug
  • all
  • info
  • warn
  • error
  • fatal
GX_LOG_OUTPUT Indicates where to send the result of the Log Level property.
  • ConsoleAppender
    (Writes to SYSOUT)
  • RollingFile
    (Writes to File)

 

Consider that when a LogLevel is specified, logging is enabled for messages at the specified level and higher. 

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

 

Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant