summaryrefslogtreecommitdiff
path: root/APACHE_1_3_42/src/support/rotatelogs.8
blob: e926199b0df0a0fc613b22206e414ccbe76ae732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.TH rotatelogs 8 "February 2004"
.\" 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.
.\"
.SH NAME
rotatelogs \- rotate Apache logs without having to kill the server
.SH SYNOPSIS
.B rotatelogs
.I logfile
.I rotationtime
.I [offset]
.PP
.SH DESCRIPTION
.B rotatelogs
is a simple program for use in conjunction with Apache's piped logfile
feature which can be used like this:

.fi
   TransferLog "| rotatelogs /path/to/logs/access_log 86400"
.nf

This creates the files /path/to/logs/access_log.nnnn where nnnn is the system
time at which the log nominally starts (this time will always be a multiple of
the rotation time, so you can synchronize cron scripts with it).  At the end
of each rotation time (here after 24 hours) a new log is started.
.SH OPTIONS
.IP \fB\fIlogfile\fP
The path plus basename of the logfile.  If \fBlogfile\fP includes any
\fB%\fP characters, it is treated as a format string for \fIstrftime(3)\fP.
Otherwise, the suffix .nnnn is automatically added and is the time at which
the logfile was created.
.IP \fB\fIrotationtime\fP
The rotation time in seconds.
.IP \fB\fIoffset\fP
The number of minutes offset from UTC.  If omitted, zero is assumed and
UTC is used.  For example, to use local time in the zone UTC -5 hours,
specify a value of \fI-300\fP for this argument.
.PD
.SH SEE ALSO
.BR httpd(8)