21The logger class

Configuration on Java

  • Feature ResolverFeature.RESOLVER_LOGGER_CLASS (type: String)

  • System property xml.catalog.resolverLoggerClass

  • Property file property resolver-logger-class

Configuration on .NET

  • This setting has no equivalent on .NET; the NLog package is used for logging on .NET

The default logger class (org.xmlresolver.logging.DefaultLogger) simply writes messages to standard error. For many applications, this is sufficient and requires no additional configuration.

An alternate logger class (org.xmlresolver.logging.SystemLogger) can easily be swapped in for environments where writing to standard error is inappropriate or where more control is desired. If the system logger is used, it uses the SLF4J API to do logging. You must configure your environment with an appropriate logging backend.

A third option, available only at the API level, is to instantiate the org.xmlresolver.logging.SystemLogger yourself and pass in the java.util.logging.Logger class that you would like it to use.

See also: Section 14, “The logging level”.