A server’s logging properties are defined in a Log Profile, which defines the logging subsystem used as well as other properties, such as output destinations, formats, and the level of severity required before a message is recorded. You can also configure different log profiles for the debug and production server versions.
EAServer supports industry-standard Java logging APIs, and provides APIs to log messages from components of other types. You can use the following logging subsystems:
The built-in EAS subsystem, which offers the same functionality available in EAServer 4.x versions, plus several enhancements including:
The ability to configure log levels so that messages below a specified level of severity are discarded.
Support for different logging configurations in the debug and production servers.
Optional archiving and compression of previous log file versions.
More control over message formatting.
Apache Log4j, which is commonly used on large projects. For more information on this package, see the Apache Log4j Documentation.
The Java Logging package, included in JDK 1.4. This API is the Sun proposed standard for logging in Java applications. For more information, see the Java Logging documentation. To use this package, your server must be running JDK 1.4 or later.
If you use Log4j or Java Logging, you can extend default behavior by plugging in your own code that implements the required interfaces. For example, you can install Log4j log handler classes that write messages to the Windows event log or to a database. Also, if you want one of these packages to log messages from your own component or application code, you can configure the server’s log profile so that server log messages go to the same destinations. In addition, if you use Log4j or the Java Logging system, you can log messages from in-server Java code by calling the logging API directly.
Using legacy logging methods Regardless of the logging system you use, you can write messages to the log using all of the methods supported in earlier versions of EAServer, such as:
System.out.println or Jaguar.writeLog from Java code running in the server
ErrorLogging.log from PowerBuilder NVO components
JagLog from C or C++ components
IJagServer.writeLog from ActiveX components
Log output from these legacy methods can be configured using the srv_log logging category.
Copyright © 2005. Sybase Inc. All rights reserved. |