Package ch.qos.logback.core
Class FileAppender<E>
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.UnsynchronizedAppenderBase<E>
-
- ch.qos.logback.core.OutputStreamAppender<E>
-
- ch.qos.logback.core.FileAppender<E>
-
- All Implemented Interfaces:
Appender<E>
,ContextAware
,FilterAttachable<E>
,LifeCycle
- Direct Known Subclasses:
RollingFileAppender
@Deprecated(since="2022-01-27") public class FileAppender<E> extends OutputStreamAppender<E>
Deprecated.This internal logback API is not supported by AEM as a Cloud Service.FileAppender appends log events to a file. For more information about this appender, please refer to the online manual at http://logback.qos.ch/manual/appenders.html#FileAppender
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_BUFFER_SIZE
Deprecated.
-
Constructor Summary
Constructors Constructor Description FileAppender()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getFile()
Deprecated.Returns the value of the File property.boolean
isAppend()
Deprecated.Returns the value of the Append property.boolean
isPrudent()
Deprecated.void
openFile(java.lang.String file_name)
Deprecated.Sets and opens the file where the log output will go.java.lang.String
rawFileProperty()
Deprecated.This method is used by derived classes to obtain the raw file property.void
setAppend(boolean append)
Deprecated.void
setBufferSize(FileSize bufferSize)
Deprecated.void
setFile(java.lang.String file)
Deprecated.The File property takes a string value which should be the name of the file to append to.void
setPrudent(boolean prudent)
Deprecated.When prudent is set to true, file appenders from multiple JVMs can safely write to the same file.void
start()
Deprecated.If the value of File is notnull
, thenopenFile(java.lang.String)
is called with the values of File and Append properties.void
stop()
Deprecated.Stop this appender instance.-
Methods inherited from class ch.qos.logback.core.OutputStreamAppender
getEncoder, getOutputStream, isImmediateFlush, setEncoder, setImmediateFlush, setLayout, setOutputStream
-
Methods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Field Detail
-
DEFAULT_BUFFER_SIZE
public static final long DEFAULT_BUFFER_SIZE
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
setFile
public void setFile(java.lang.String file)
Deprecated.The File property takes a string value which should be the name of the file to append to.
-
isAppend
public boolean isAppend()
Deprecated.Returns the value of the Append property.
-
rawFileProperty
public final java.lang.String rawFileProperty()
Deprecated.This method is used by derived classes to obtain the raw file property. Regular users should not be calling this method.- Returns:
- the value of the file property
-
getFile
public java.lang.String getFile()
Deprecated.Returns the value of the File property.This method may be overridden by derived classes.
-
start
public void start()
Deprecated.If the value of File is notnull
, thenopenFile(java.lang.String)
is called with the values of File and Append properties.- Specified by:
start
in interfaceLifeCycle
- Overrides:
start
in classOutputStreamAppender<E>
-
stop
public void stop()
Deprecated.Description copied from class:OutputStreamAppender
Stop this appender instance. The underlying stream or writer is also closed.Stopped appenders cannot be reused.
- Specified by:
stop
in interfaceLifeCycle
- Overrides:
stop
in classOutputStreamAppender<E>
-
openFile
public void openFile(java.lang.String file_name) throws java.io.IOException
Deprecated.Sets and opens the file where the log output will go. The specified file must be writable.
If there was already an opened file, then the previous file is closed first.
Do not use this method directly. To configure a FileAppender or one of its subclasses, set its properties one by one and then call start().
- Parameters:
file_name
- The path to the log file.- Throws:
java.io.IOException
-
isPrudent
public boolean isPrudent()
Deprecated.- Returns:
- true if in prudent mode
- See Also:
setPrudent(boolean)
-
setPrudent
public void setPrudent(boolean prudent)
Deprecated.When prudent is set to true, file appenders from multiple JVMs can safely write to the same file.- Parameters:
prudent
-
-
setAppend
public void setAppend(boolean append)
Deprecated.
-
setBufferSize
public void setBufferSize(FileSize bufferSize)
Deprecated.
-
-