Rotatelogs - Pipeline log program back to Apache log

xiaoxiao2021-03-06  44

Rotatelogs is a simple program used in conjunction with the Apache pipe log. Example: CustomLog "| bin / rotatelogs / var / logs / logfile 86400" CommON This configuration creates file /var/logs/logfile.nnnn, where NNNN is the system time at startup in the name log start (this time is always back The multiple of the volume time can be used for synchronization of the cron script). When the returned time arrives (after 24 hours in this case), a new log will be generated. CustomLog "| bin / rotatelogs / var / logs / logfile 5m" COMMON This configuration will return the log file size when the log file size is increased to 5 megabytes. Summary Rotatelogs logfile [otationtime [offset]] | [filesis "option logfile It plus the reference name is the log file name. If the logfile contains '%', it is considered to be a format string for StrFTIME (3); otherwise, it will be automatically added to the .nnnnnnnnnnn numerical suffix. Both formats represent the new log to start using it. The RotationTime log file returns the number of minutes of the spacing time OFFSET in seconds. The number of minutes of the time difference of the UTC. If omitted, it is assumed to be 0 and the UTC time is used. For example, to specify the local time of the region of the UTC time difference to the region of -5 hours, this parameter should be -300. FileSizem specifies the file size of the suffix letter M with megabytes when the rebound is returned, not the specified back time or time difference. Portability The following log file format strings can be supported for all StrFTIME (3), see the manual of StrFTIME (3) corresponding to various expansion libraries. % A Name Name (Local)% a 3 characters of the weekly name (local)% B month name (local)% b 3 characters of the month name (local)% C Date and time (local )% D 2 digits of a month of the date% H 2 digits of hours (24-hour system)% i 2 digits of hours (12 hours)% J 3 bits of one year Date% M 2 digits minimum M 2 digits Month Number% P AM / PM 12 hourly-stop (local)% s 2 digits of the number of seconds of the number of U 2 digits The week (the first day of Sunday)% w 2 bits of the year (Monday is the first day of the first day)% W 1 number of days (Sunday is the first day of the week )% X time (local)% x date (local)% y 4 bits year% y 2 digit year% z time zone name %% symbol`% 'itself

转载请注明原文地址:https://www.9cbs.com/read-58826.html

New Post(0)