Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Hostname string // Hostname of the machine we are logging from. LogLevel logrus.Level // Log level of messages we want to send to socket. Service string // Service that is creating the logs. SocketAddr string // Address to the socket. SocketProtocol string // Protocol of the socket. AddNewLine bool // Toggle to send newline after every message to socket. }
Config serves as means to configure logger and hook.
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook represents a connection to a socket
func NewHook ¶
NewHook establish a socket connection. Protocols allowed are: "udp", "tcp", "unix" (corresponds to SOCK_STREAM), "unixdomain" (corresponds to SOCK_DGRAM) or "unixpacket" (corresponds to SOCK_SEQPACKET).
For TCP and UDP, address must have the form `host:port`.
For Unix networks, the address must be a file system path.
Click to show internal directories.
Click to hide internal directories.