DailyFile
- AppenderFile
DailyFile extends AppenderFile
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Property summary
Modifier and Type | Property |
---|---|
protected string | datePattern |
protected string | currentDate |
Methods summary
Modifier and Type | Method |
---|---|
public | activateOptions ( ) |
public | append ( LoggingEvent event ) |
protected | getDate ( unknown timestamp = null ) |
protected | getTargetFile ( ) |
public | setDatePattern ( string datePattern ) |
public string | getDatePattern ( ) |
Properties in detail
-
datePattern
protected string datePattern
The 'datePattern' parameter. Determines how date will be formatted in file name.var
string -
currentDate
protected string currentDate
Current date which was used when opening a file. Used to determine if a rollover is needed when the date changes.var
string
Methods in detail
-
activateOptions
public activateOptions ( ) -
append
public append ( LoggingEvent event )Appends a logging event. If the target file changes because of passage of time (e.g. at midnight) the current file is closed. A new file, with the new date, will be opened by the write() method. -
getDate
protected getDate ( unknown timestamp = null ) -
getTargetFile
protected getTargetFile ( )Determines target file. Replaces %s in file path with a date. -
setDatePattern
public setDatePattern ( string datePattern )Sets the 'datePattern' parameter.param
string datePattern -
getDatePattern
string public getDatePattern ( )Returns the 'datePattern' parameter.return
string