Class AccessLogHandler
java.lang.Object
java.util.logging.Handler
java.util.logging.StreamHandler
java.util.logging.FileHandler
io.helidon.nima.webserver.accesslog.AccessLogHandler
Log handler to support separation of access log to its own file.
This is used with Java Logging. For other frameworks, such as slf4j or log4j you can use a bridge for
Java Logging and configure a separate file using implementation specific configuration.
Java util logging configuration example using this handler:
# Configure the log handler (uses the same configuration options as FileHandler, ignores formatter io.helidon.nima.webserver.accesslog.AccessLogHandler.level=FINEST io.helidon.nima.webserver.accesslog.AccessLogHandler.pattern=access.log io.helidon.nima.webserver.accesslog.AccessLogHandler.append=true # Configure the logger io.helidon.nima.webserver.AccessLog.level=INFO io.helidon.nima.webserver.AccessLog.useParentHandlers=false io.helidon.nima.webserver.AccessLog.handlers=io.helidon.nima.webserver.accesslog.AccessLogHandler
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.logging.FileHandler
close, publishMethods inherited from class java.util.logging.StreamHandler
flush, isLoggable, setEncoding, setOutputStreamMethods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setErrorManager, setFilter, setLevel
-
Constructor Details
-
AccessLogHandler
Construct a defaultAccessLogHandler. This will be configured entirely fromSystem.Logger.- Throws:
IOException- if there are IO problems opening the files.SecurityException- if a security manager exists and if the caller does not haveLoggingPermission("control")).NullPointerException- if pattern property is an empty String.
-
-
Method Details
-
setFormatter
- Overrides:
setFormatterin classHandler- Throws:
SecurityException
-