Version 4.10.0

Interface LoggingConfig

All Known Implementing Classes:

public interface LoggingConfig

Configure the logging system used in your application.

See BuildImpl for important information on how this item is configured. BuildImpl.forLoggingConfig() returns the configured implementation of this interface.

Here, implementations configure the logging system using code, not a configuration file. WEB4J itself uses JDK logging. Your application may also use JDK logging, or any other logging system.

If your application does not require any logging config performed in code, then just set the LoggingDirectory in web.xml set to 'NONE'.

Implementations of this interface are called by the framework only once, upon startup.

Independent Logging On Servers
In the JDK config file, it is important to remember that the handlers setting creates Handlers and attaches them to the root logger. In general, those default handlers will be shared by all applications running in that JRE. This is not appropriate for most server environments. In a servlet environment, however, each application uses a private class loader. This means that each application can perform its own custom logging config in code, instead of in, and retain independence from other applications running in the same JRE.

Method Summary
 void setup(Map<String,String> aConfig)
          Configure application logging.

Method Detail


void setup(Map<String,String> aConfig)
           throws AppException
Configure application logging.

aConfig - - in a servlet environment, this map will hold the init-param items for the servlet, as stated in web.xml.

Version 4.10.0

Copyright Hirondelle Systems. Published October 19, 2013 - User Guide - All Docs.