PKI 10.6 Logging Improvements - dogtagpki/pki GitHub Wiki
In PKI 10.6 the internal logging framework has been replaced with Tomcat’s JULI which is based on java.util.logging.
For backward compatibility, the code using the internal logging framework should continue to work. The logging configuration in the CS.cfg
should continue to work as well.
For code portability, new logging code should be written using SLF4J API, and existing logging code should incrementally be converted to SLF4J API.
PKI server will use separate logging configuration for each subsystem:
-
Global logging.properties
-
OCSP logging.properties
This will be documented in PKI 10.6 Server Logging.
The logging framework can be used as follows:
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.netscape.certsrv.apps.CMS; public class MyProgram { final static Logger logger = LoggerFactory.getLogger(MyProgram.class); public static void main(String[] args) { // using SLF4J API logger.info("Log message"); // using PKI logging API CMS.debug("Log message"); } }
See also SLF4J.