Valid in: | XML configuration |
Default | None |
Requirement | These attributes are required. |
Default | TRUE |
Requirement | This parameter is not required. |
Interaction | If both the Unique parameter and the Append parameter are specified, then the Unique parameter takes precedence. For details, see the Unique parameter. |
Default | The encoding setting that is in effect for the SAS session. For example, the ENCODING system option might be specified in the configuration file for a SAS server or for Base SAS. If the ENCODING system option is not specified for the SAS session, then the defaults that are described in the SAS National Language Support (NLS): Reference Guide are used. |
For logging processes that run outside a SAS session (for example, logging for the SAS Object Spawner),the default is the encoding that is specified in the operating system settings. | |
Requirement | This parameter is not required. |
See | SAS National Language Support (NLS): Reference Guide |
Default | None |
Requirement | This parameter is not required. |
Interaction | This filename overwrites any value that you specify for path-and-filename-pattern in a RollingPolicy or TriggeringPolicy configuration. |
Default | FALSE |
Requirement | This parameter is not required. |
Default | The locale setting that is in effect for the SAS session. For example, the LOCALE system option might be specified in the configuration file for a SAS server or for Base SAS. |
For logging processes that run outside a SAS session (for example, logging for the SAS Object Spawner), the default is the locale that is specified in the operating system settings. | |
Requirement | This parameter is not required. |
See | SAS National Language Support (NLS): Reference Guide |
Default | None |
Requirement | This parameter is not required. |
See | Logging Thresholds |
Events_%d.log
is specified in path-and-filename-pattern for TimeBasedRollingPolicy.
If the current date is August 3, 2008, and a file already exists that
has the name Events_20080803.log
, then
the next log file that is created is named Events_20080803_0.log
. If a file already exists that has the name Events_20080803_0.log
, then the next log file that is created is named Events_20080803_1.log
.
Default | FALSE |
Requirement | This parameter is not required. |
Interactions | If both the Unique parameter and the Append parameter are specified, then the Unique parameter takes precedence. If the log file already exists when logging begins, and if Unique is set to TRUE and Append is set to either TRUE or FALSE, then messages are written to a new file with a unique number appended to the filename. |
If Unique is set to TRUE and FixedWindowRollingPolicy is specified, then a complete set of unique files is created when logging begins. For details, see the Interaction for FixedWindowRollingPolicy |
Default | None |
Requirement | filter-definitions are not required. |
See | Filters |
Default | None. If a conversion pattern is not specified, then the log event produces an empty string. |
Requirement | This parameter is not required. |
See | Pattern Layouts |
See | S Conversion Character |
Default | None |
Requirement | This parameter is not required. |
Interaction | If both the File parameter and the FileNamePattern parameter are specified, then the File parameter takes precedence. |
Example | Specify c:\logs\MetadataServer_S{host_name}_%i.log if you want the log files to be written to the path c:\logs\ and if you want the files to be named MetadataServer_host-name_01.log, MetadataServer_ host-name_02.log, and so on. |
Default | 7 |
Range | 1–14 |
Requirement | This parameter is not required. |
Interaction | If maximum-index is equal to minimum-index, then only one file is created. |
03
in the position that
is specified by %i
in the filename
pattern.
Default | 1 |
Range | 1–14 |
Requirement | This parameter is not required. |
Interactions | If Unique is set to TRUE and FixedWindowRollingPolicy is specified, then a complete set of fixed window files is created when logging begins. If one or more sets of fixed window files already exist when logging begins, then a new set of fixed window files is created that has an underscore character and a unique number appended to each filename. |
For example, if Unique is set to TRUE and FixedWindowRollingPolicy is specified with a filename pattern of Events%i.log, a minimum-index of 1, and a maximum-index of 4, then log files are created as follows: | |
When logging first begins, the following empty files are created: Events01.log , Events02.log , Events03.log , and Events04.log. Messages are written to Events01.log and are rolled over to the other files in the group as specified by the triggering policy. | |
The next time logging begins, the following set of files is created and written to: Events01_0.log , Events02_0.log , Events03_0.log , and Events04_0.log. | |
Each subsequent time that logging begins, a new set of files is created with a new unique suffix (for example, _1 , _2 , _3 ). |
Log continues in
path-and-filename is written to the end of the
current file. The message Log continued from
path-and-filename is written
to the beginning of the newly created file.
%d
if
you want the date to appear in a format other than yyyy-mm-dd, or if you want to include additional
information such as the hour.
See | Pattern Layouts |
See | S Conversion Character |
Default | None |
Requirement | This parameter is required. |
Interaction | If both the File parameter and the FileNamePattern parameter are specified, then the File parameter takes precedence. |
Example | For example, specify c:\logs\MetadataServer_%d_%S{host_name}.log if you want the log files to be written to the path c:\logs\ and the filename to include the current date and the name of the metadata server host machine. |
Default | TRUE |
Requirement | This argument is not required. |
KB
(for kilobytes), MB
(for megabytes), or GB
(for gigabytes)
when you are specifying the size. For example, 10KB
is interpreted as 10240
bytes.
See | Filters |
%S{pid}
).
MetadataServer_2012–03–01.log
). When the system date changes, messages roll over to a new log
file whose name contains the new date (for example, MetadataServer_2012–03–02.log
).
<appender class="RollingFileAppender" name="TimeBasedRollingFile"> <param name="Append" value="true"/> <param name="ImmediateFlush" value="true"/> <rollingPolicy class="TimeBasedRollingPolicy"> <param name="FileNamePattern" value="c:\logs\MetadataServer_%d.log"/> </rollingPolicy> <layout> <param name="ConversionPattern" value="%d %-5p [%t] %u - %m"/> </layout> </appender>
MetadataServer_2012–03–01.log
). When a new session begins, messages roll over to a new log file
whose name contains the current date (for example, MetadataServer_2012–03–02.log
).
<appender class="RollingFileAppender" name="TimeBasedRollingFile"> <param name="Append" value="true"/> <param name="ImmediateFlush" value="true"/> <rollingPolicy class="TimeBasedRollingPolicy"> <param name="FileNamePattern" value="c:\logs\MetadataServer_%d.log"/> <param name="rollOver" value="false"/> </rollingPolicy> <layout> <param name="ConversionPattern" value="%d %-5p [%t] %u - %m"/> </layout> </appender>
MetadataServer_01.log
. When the size of MetadataServer_01.log
is greater than or equal to 100 KB, the file is renamed to MetadataServer_02.log
, and subsequent messages are
written to a newly created instance of MetadataServer_01.log
.
MetadataServer_01.log
reaches or exceeds 100 KB, MetadataServer_02.log
is renamed to MetadataServer_03.log
, MetadataServer_01.log
is renamed to MetadataServer_02.log
, and subsequent messages are written to a newly created instance
of MetadataServer_01.log
.
MetadataServer_09.log
are overwritten when rollover
occurs.
<!-- Rolling log file based on log file size --> <appender class="RollingFileAppender" name="FixedWindowRollingFile"> <param name="Append" value="true"/> <param name="ImmediateFlush" value="true"/> <rollingPolicy class="FixedWindowRollingPolicy"> <param name="FileNamePattern" value="c:\logs\MetadataServ_%i.log"/> <param name="minIndex" value="1"/> <param name="maxIndex" value="9"/> </rollingPolicy> <triggeringPolicy class="SizeBasedTriggeringPolicy"> <param name="MaxFileSize" value="100KB"/> </triggeringPolicy> <layout> <param name="ConversionPattern" value="%d %-5p [%t] %u - %m"/> </layout> </appender>