Documentation ¶
Overview ¶
Package logtarget implements a multiplexing logging target
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogTarget ¶
LogTarget implements the io.Writer interface, allowing LogTarget to be registered with the regular Go log package. LogTarget multiplexes its incoming writes to multiple optional output writers, and one main output writer (the log file).
var Default LogTarget
Default is the default log target for the application It has to be initialized before used
func OpenFile ¶
OpenFile creates a LogTarget pointing to a log file and returns it. This method will open the file in append-only mode. It also takes a variable number of writers that are other log targets
func OpenWriters ¶
OpenWriters returns a log target that will log to all the given writers at the same time