Documentation
¶
Overview ¶
Package hupwriter provides wrapper of os.File.
The wrapper will close and reopen the file when a HUP signal is received. It allows easier log file rotation.
By logging to hupwriter you can create log files that can be used with log rotation management programs such as logrotate, newsyslog, or so.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HupWriter ¶
type HupWriter struct {
// contains filtered or unexported fields
}
HupWriter wraps os.File, and will close and reopen the file when a HUP signal is received.
func New ¶
New creates a HupWriter with a file of name. It create PID file which records current process ID when pid is not empty.
Click to show internal directories.
Click to hide internal directories.