package zapjournal

Import Path
	go.pact.im/x/zapjournal (on go.dev)

Dependency Relation
	imports 14 packages, and imported by 0 packages

Involved Source Files append.go config.go encoder.go json.go pool.go varname.go Package zapjournal provides a zapcore.Core implementation that sends logs to systemd-journald socket. zapjournal_linux.go
Package-Level Type Names (total 7, in which 3 are exported)
/* sort exporteds by: | */
Config contains the options for the zapcore.Core implementation. Level decides whether a given logging level is enabled. Defaults to all levels enabled (i.e. debug level). Path specifies the journal socket path to send logs to. Defaults to "/run/systemd/journal/socket". Prefix is the variable name prefix for journald fields. Defaults to "X". func NewCoreWithConfig(conn UnixConn, c *Config) zapcore.Core
Option modifies the given configuration for the zapcore.Core implementation. func WithLevel(level zapcore.LevelEnabler) Option func WithPath(path string) Option func WithPrefix(prefix string) Option func NewCore(conn UnixConn, opts ...Option) zapcore.Core
UnixConn is the subset of the net.UnixConn interface used by the zap.Core implementation that sends logs to journald. ( UnixConn) WriteMsgUnix(b, oob []byte, addr *net.UnixAddr) (n, oobn int, err error) *net.UnixConn func NewCore(conn UnixConn, opts ...Option) zapcore.Core func NewCoreWithConfig(conn UnixConn, c *Config) zapcore.Core
Package-Level Functions (total 26, in which 7 are exported)
Available checks whether the journald socket exists at the default path on the current system.
Bind is a convenience function that returns a new unixgram client connection for communicating with journald.
NewCore returns a new core that uses default configuration with the given options applied and sends logs to journald socket. On non-Linux platforms it always returns no-op implementation.
NewCoreWithConfig returns a new core that uses the given configuration and sends logs to journald socket. If c is nil, default values are used. On non-Linux platforms it always returns no-op implementation.
WithLevel sets the Level configuration option.
WithPath sets the Path configuration option.
WithPrefix sets the Prefix configuration option.
Package-Level Variables (total 2, neither is exported)
Package-Level Constants (total 13, none are exported)