update docs w/ backup format info
This commit is contained in:
@@ -87,6 +87,14 @@ the current file is closed, renamed, and a new log file created with the
|
|||||||
original name. Thus, the filename you give Logger is always the "current" log
|
original name. Thus, the filename you give Logger is always the "current" log
|
||||||
file.
|
file.
|
||||||
|
|
||||||
|
Backups use the log file name given to Logger, in the form `name-timestamp.ext`
|
||||||
|
where name is the filename without the extension, timestamp is the time at which
|
||||||
|
the log was rotated formatted with the time.Time format of
|
||||||
|
`2006-01-02T15-04-05.000` and the extension is the original extension. For
|
||||||
|
example, if your Logger.Filename is `/var/log/foo/server.log`, a backup created
|
||||||
|
at 6:30pm on Nov 11 2016 would use the filename
|
||||||
|
`/var/log/foo/server-2016-11-04T18-30-00.000.log`
|
||||||
|
|
||||||
### Cleaning Up Old Log Files
|
### Cleaning Up Old Log Files
|
||||||
Whenever a new logfile gets created, old log files may be deleted. The most
|
Whenever a new logfile gets created, old log files may be deleted. The most
|
||||||
recent files according to the encoded timestamp will be retained, up to a
|
recent files according to the encoded timestamp will be retained, up to a
|
||||||
|
|||||||
@@ -55,6 +55,14 @@ var _ io.WriteCloser = (*Logger)(nil)
|
|||||||
// original name. Thus, the filename you give Logger is always the "current" log
|
// original name. Thus, the filename you give Logger is always the "current" log
|
||||||
// file.
|
// file.
|
||||||
//
|
//
|
||||||
|
// Backups use the log file name given to Logger, in the form
|
||||||
|
// `name-timestamp.ext` where name is the filename without the extension,
|
||||||
|
// timestamp is the time at which the log was rotated formatted with the
|
||||||
|
// time.Time format of `2006-01-02T15-04-05.000` and the extension is the
|
||||||
|
// original extension. For example, if your Logger.Filename is
|
||||||
|
// `/var/log/foo/server.log`, a backup created at 6:30pm on Nov 11 2016 would
|
||||||
|
// use the filename `/var/log/foo/server-2016-11-04T18-30-00.000.log`
|
||||||
|
//
|
||||||
// Cleaning Up Old Log Files
|
// Cleaning Up Old Log Files
|
||||||
//
|
//
|
||||||
// Whenever a new logfile gets created, old log files may be deleted. The most
|
// Whenever a new logfile gets created, old log files may be deleted. The most
|
||||||
|
|||||||
Reference in New Issue
Block a user