java.lang.Object
java.util.logging.Handler
java.util.logging.StreamHandler
java.util.logging.FileHandler
io.helidon.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.webserver.accesslog.AccessLogHandler.level=FINEST io.helidon.webserver.accesslog.AccessLogHandler.pattern=access.log io.helidon.webserver.accesslog.AccessLogHandler.append=true # Configure the logger io.helidon.webserver.AccessLog.level=INFO io.helidon.webserver.AccessLog.useParentHandlers=false io.helidon.webserver.AccessLog.handlers=io.helidon.webserver.accesslog.AccessLogHandler
-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.logging.FileHandler
close, publish
Methods inherited from class java.util.logging.StreamHandler
flush, isLoggable, setEncoding, setOutputStream
Methods 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 fromLogManager
properties (or their default values).- 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:
setFormatter
in classHandler
- Throws:
SecurityException
-