Official Content

Configures how much detail has to be added to the log of the standard classes at runtime.

Values

6. All The ALL Level has the lowest possible rank and is intended to turn on all logging.
5. Debug The DEBUG Level designates fine-grained informational events that are most useful to debug an application.
2. Error The ERROR Level designates error events that might still allow the application to continue running.
1. Fatal The FATAL Level designates very severe error events that will presumably lead the application to abort.
4. Info The INFO Level designates informational messages that highlight the progress of the application at coarse-grained level.
0. Off The OFF Level has the highest possible rank and is intended to turn off logging. This is the default value.
3. Warn The WARN Level designates potentially harmful situations.

Scope

Objects: Procedure, Panel, Web Panel, Web Component, Data Provider, Transaction
Generators: .NET, .NET Framework, Java
Level: Generator

Description

When using the .NET Generator and having the Log output property set to Console/File, the Log level property modifies the values of the <log4net threshold=...> tag of the Log.config and Log.Console.Config files. Additionally, it sets the <trace enabled=... /> tag of the Web.Config file. These config files can be found in the web applications folder.

Tip: The log.config file is referenced by web.config (<log4net configSource="log.config"/>) and is used when running the web app. Log.Console.config file is referenced by Client.exe.config and is used for command line executions. For further information, check Log4net configuration in GeneXus .Net application.

When using the Java Generator, this property modifies the values of the <loggers=...> tag of the log4j.xml file. The log4j2.xml file can be found in the <webapp>\WEB-INF\classes folder.

The Log Level can also be set by defining an environment variable. See Log settings with environment variables.

Advanced configuration

To modify or extend log parameters, you can change values on the following templates:

  • rollingfile.console.config which goes to the log.console.config file used in command-line programs.
  • rollingfile.web.config which goes to the log.config file used in the web application.

Files are located in "GeneXusInstallFolder"\Log\Java\RollingFile and "GeneXusInstallFolder"\Log\Dotnet\RollingFile

To generate a log file for every day, change the template as follows:

 <appender  name="RollingFile" type="log4net.Appender.RollingFileAppender">
      <file  value="./"/>
      <appendToFile  value="true"/>
      <maximumFileSize  value="9000KB"/>
      <maxSizeRollBackups  value="0"/>
      <rollingStyle  value="Date"/>
      <staticLogFileName value="false" />
      <datePattern value="dd.MM.yyyy'.log'" />
      <layout  type="log4net.Layout.PatternLayout">
         <conversionPattern value="%d [%t] %-5p %c - %m%n" />
      </layout>
      <lockingModel  type="log4net.Appender.FileAppender+MinimalLock"/>
</appender>

Runtime/Design time

This property applies only at design time.

How to apply changes

To apply the corresponding changes when the property value is configured, Build any object.

See Also

Log output property
Log external object
HowTo: See trace information in applications hosted on .NET Cloud
Log JDBC Activity property

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant