public final class TextHTTPAccessLogPublisher extends HTTPAccessLogPublisher<FileBasedHttpAccessLogPublisherCfg> implements ConfigurationChangeListener<FileBasedHttpAccessLogPublisherCfg>
Constructor and Description |
---|
TextHTTPAccessLogPublisher() |
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationChange(FileBasedHttpAccessLogPublisherCfg config)
Applies the configuration changes to this change listener.
|
void |
close()
Close this publisher.
|
Dn |
getDN()
Gets the DN of the configuration entry for this log publisher.
|
static TextHTTPAccessLogPublisher |
getStartupTextHTTPAccessPublisher(TextWriter writer)
Returns an instance of the text HTTP access log publisher that will print all messages to the provided writer.
|
void |
initializeLogPublisher(FileBasedHttpAccessLogPublisherCfg cfg,
ServerContext serverContext)
Initializes this publisher provider based on the information in the provided debug publisher configuration.
|
boolean |
isConfigurationAcceptable(FileBasedHttpAccessLogPublisherCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this log publisher.
|
boolean |
isConfigurationChangeAcceptable(FileBasedHttpAccessLogPublisherCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable
to this change listener.
|
void |
logRequestInfo(HTTPRequestInfo ri)
Logs the request info according to the configured extended log format.
|
public static TextHTTPAccessLogPublisher getStartupTextHTTPAccessPublisher(TextWriter writer)
writer
- The text writer where the message will be written to.public ConfigChangeResult applyConfigurationChange(FileBasedHttpAccessLogPublisherCfg config)
ConfigurationChangeListener
applyConfigurationChange
in interface ConfigurationChangeListener<FileBasedHttpAccessLogPublisherCfg>
config
- The new configuration containing the changes.public void initializeLogPublisher(FileBasedHttpAccessLogPublisherCfg cfg, ServerContext serverContext) throws ConfigException, InitializationException
LogPublisher
initializeLogPublisher
in interface LogPublisher<FileBasedHttpAccessLogPublisherCfg>
cfg
- The publisher configuration that contains the information to use to initialize this publisher.serverContext
- The server context.ConfigException
- If an unrecoverable problem arises in the process of performing the initialization as a result of the
server configuration.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.public boolean isConfigurationAcceptable(FileBasedHttpAccessLogPublisherCfg configuration, List<LocalizableMessage> unacceptableReasons)
LogPublisher
isConfigurationAcceptable
in interface LogPublisher<FileBasedHttpAccessLogPublisherCfg>
isConfigurationAcceptable
in class HTTPAccessLogPublisher<FileBasedHttpAccessLogPublisherCfg>
configuration
- The log publisher configuration for which to make the determination.unacceptableReasons
- A list that may be used to hold the reasons that the provided configuration is not acceptable.true
if the provided configuration is acceptable for this log publisher, or false
if not.public boolean isConfigurationChangeAcceptable(FileBasedHttpAccessLogPublisherCfg config, List<LocalizableMessage> unacceptableReasons)
ConfigurationChangeListener
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<FileBasedHttpAccessLogPublisherCfg>
config
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed change is acceptable,
or false
if it is not.public final void close()
LogPublisher
close
in interface Closeable
close
in interface AutoCloseable
close
in interface LogPublisher<FileBasedHttpAccessLogPublisherCfg>
public final Dn getDN()
LogPublisher
getDN
in interface LogPublisher<FileBasedHttpAccessLogPublisherCfg>
public void logRequestInfo(HTTPRequestInfo ri)
HTTPAccessLogPublisher
logRequestInfo
in class HTTPAccessLogPublisher<FileBasedHttpAccessLogPublisherCfg>
ri
- The request info to logCopyright 2010-2022 ForgeRock AS.