Generate log messages
- The JVP JVP messages report such conditions as:
- JVP status (such as boot progress)
- Warnings about missing or limited resources
- Execution errors (such as being unable to locate a UDR)
- Internal errors (such as unexpected exceptions)
JVP log messages that report serious errors usually print a Java-method stack trace.
- The UDR
Log messages from the UDR are messages that make sense only in the JVP and Java™ domain or that can complement the messages from SQL or the database server with annotations and references that are specific to Java code or the JVP.
Following methods are deprecated:- UDRLog.log()
- UDRTraceable.tracePrint()
$INFORMIXDIR/tmp/jvp.log
Using Logback for logging messages
J/Foundation uses Logback and SLF4J to log messages to a log file. You can change the properties of how J/Foundation log messages by editing the $INFORMIXDIR/extend/krakatoa/logback.xml file.
Log Rotation
Log rotation is done now in the logback.xml file. An example log rotation appender section is provided in the default logback.xml that is shipped with Informix. You can switch between the default file appender and the rotating file appender.
Sample logback.xml file:
<configuration>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<append>true</append>
<file>/tmp/jvp.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!--
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>$INFORMIXDIRrollingjvp.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>/tmp/rollingjvp%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
-->
<!-- The base logging level is set here -->
<!-- You can choose from (TRACE, DEBUG, INFO, WARN, ERROR) -->
<root level="INFO">
<appender-ref ref="FILE" />
</root>
<logger name="com.informix.jdbc" level=“WARN" />
</configuration>
You can change the logging level of J/Foundation as a whole or a specific Java package by adding <logger> sections to the logback.xml file. You can provide a package name or a fully qualified class name which allows you to customize messages for parts of J/Foundation or for certain UDR's.
For more information about LOGBack and its configuration options at https://logback.qos.ch/manual/index.html.
Restriction:Do not use the JVP log for error messages that need to be reported to the client application or to the main online.log file. Instead, you can throw a SQLException.