Platform SDK Java 8.5 API Reference

com.genesyslab.platform.logging.runtime.targets
Class FileTarget

java.lang.Object
  extended by com.genesyslab.platform.commons.log.AbstractLogEnabled
      extended by com.genesyslab.platform.logging.runtime.targets.BaseTarget
          extended by com.genesyslab.platform.logging.runtime.targets.FileTarget
All Implemented Interfaces:
ILogEnabled, Target

public final class FileTarget
extends BaseTarget


Nested Class Summary
static class FileTarget.RollingMode
           
 
Constructor Summary
FileTarget(java.lang.String filename, VerboseLevel level, Formatter formatter)
           
 
Method Summary
 void applyConfiguration(LogConfiguration configuration, FileConfiguration fileConfiguration)
           
 void dispose()
          Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
protected  void doActivate()
           
protected  void doApplyConfiguration(LogConfiguration configuration)
           
protected  void doStop()
           
protected  void doWrite(LogEntry entry)
           
 FileHeaderProvider getDefaultFileHeaderProvider()
           
 java.lang.String getEncoding()
           
 ExpirationConfiguration getExpiration()
           
 FileHeaderProvider getFileHeaderProvider()
           
 java.lang.String getFileName()
           
 boolean getFlushWriter()
           
 long getMaxFileSize()
          The max file size (in bytes).
 int getTimeRollInterval()
          The time interval for rolling.
 boolean isEnabled()
           
protected  void onEnableLogging(ILogger logger)
          Override this method to perform additional logging related actions, such as passing logger down to hierarchy, etc.
 void setEnabled(boolean value)
           
 void setEncoding(java.lang.String encoding)
           
 void setExpiration(ExpirationConfiguration value)
           
 void setFileHeaderProvider(FileHeaderProvider value)
           
 void setFileName(java.lang.String value)
           
 void setFlushWriter(boolean value)
           
 void setMaxFileSize(int value)
           
 void setRollingStyle(FileTarget.RollingMode value)
           
 void setTimeRollInterval(int timeRollInterval)
           
 
Methods inherited from class com.genesyslab.platform.logging.runtime.targets.BaseTarget
activate, applyConfiguration, enableLogging, getFilter, getFormatter, getVerbose, setFilter, setFormatter, setVerbose, stop, write
 
Methods inherited from class com.genesyslab.platform.commons.log.AbstractLogEnabled
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTarget

public FileTarget(java.lang.String filename,
                  VerboseLevel level,
                  Formatter formatter)
Method Detail

getDefaultFileHeaderProvider

public FileHeaderProvider getDefaultFileHeaderProvider()

getFlushWriter

public boolean getFlushWriter()

setFlushWriter

public void setFlushWriter(boolean value)
                    throws LoggerException
Throws:
LoggerException

getFileHeaderProvider

public FileHeaderProvider getFileHeaderProvider()

setFileHeaderProvider

public void setFileHeaderProvider(FileHeaderProvider value)
                           throws LoggerException
Throws:
LoggerException

getFileName

public java.lang.String getFileName()

setFileName

public void setFileName(java.lang.String value)
                 throws LoggerException
Throws:
LoggerException

getExpiration

public ExpirationConfiguration getExpiration()

setExpiration

public void setExpiration(ExpirationConfiguration value)
                   throws LoggerException
Throws:
LoggerException

getTimeRollInterval

public int getTimeRollInterval()
The time interval for rolling. min allowed = 1 hour.


setTimeRollInterval

public void setTimeRollInterval(int timeRollInterval)
                         throws LoggerException
Throws:
LoggerException

getMaxFileSize

public long getMaxFileSize()
The max file size (in bytes).


setMaxFileSize

public void setMaxFileSize(int value)
                    throws LoggerException
Throws:
LoggerException

setRollingStyle

public void setRollingStyle(FileTarget.RollingMode value)
                     throws LoggerException
Throws:
LoggerException

isEnabled

public boolean isEnabled()
Overrides:
isEnabled in class BaseTarget

setEnabled

public void setEnabled(boolean value)
Overrides:
setEnabled in class BaseTarget

doActivate

protected void doActivate()
                   throws LoggerException
Specified by:
doActivate in class BaseTarget
Throws:
LoggerException

doApplyConfiguration

protected void doApplyConfiguration(LogConfiguration configuration)
Overrides:
doApplyConfiguration in class BaseTarget

applyConfiguration

public void applyConfiguration(LogConfiguration configuration,
                               FileConfiguration fileConfiguration)

doWrite

protected void doWrite(LogEntry entry)
                throws java.lang.Exception
Specified by:
doWrite in class BaseTarget
Throws:
java.lang.Exception

doStop

protected void doStop()
Specified by:
doStop in class BaseTarget

onEnableLogging

protected void onEnableLogging(ILogger logger)
Description copied from class: AbstractLogEnabled
Override this method to perform additional logging related actions, such as passing logger down to hierarchy, etc.

Overrides:
onEnableLogging in class AbstractLogEnabled
Parameters:
logger - The ILogger instance

getEncoding

public java.lang.String getEncoding()

setEncoding

public void setEncoding(java.lang.String encoding)

dispose

public void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.


Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.