log

package
v0.0.0-...-62e6a5e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2015 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLogger

type AuditLogger struct {
	*syslog.Writer
	Stats statsd.Statter
}

AuditLogger is a System Logger with additional audit-specific methods. In addition to all the standard syslog.Writer methods from http://golang.org/pkg/log/syslog/#Writer, you can also call

auditLogger.Audit(msg string)

to send a message as an audit event.

func Dial

func Dial(network, raddr string, tag string, stats statsd.Statter) (*AuditLogger, error)

Dial establishes a connection to the log daemon by passing through the parameters to the syslog.Dial method. See http://golang.org/pkg/log/syslog/#Dial

func NewAuditLogger

func NewAuditLogger(log *syslog.Writer, stats statsd.Statter) (*AuditLogger, error)

NewAuditLogger constructs an Audit Logger that decorates a normal System Logger. All methods in log/syslog continue to work.

func (*AuditLogger) Alert

func (log *AuditLogger) Alert(msg string) (err error)

func (*AuditLogger) Audit

func (log *AuditLogger) Audit(msg string) (err error)

Audit sends a NOTICE-severity message that is prefixed with the audit tag, for special handling at the upstream system logger.

func (*AuditLogger) AuditErr

func (log *AuditLogger) AuditErr(msg error) (err error)

Audit can format an error for auditing; it does so at ERR level.

func (*AuditLogger) Crit

func (log *AuditLogger) Crit(msg string) (err error)

func (*AuditLogger) Debug

func (log *AuditLogger) Debug(msg string) (err error)

func (*AuditLogger) Emerg

func (log *AuditLogger) Emerg(msg string) (err error)

func (*AuditLogger) Err

func (log *AuditLogger) Err(msg string) (err error)

func (*AuditLogger) Info

func (log *AuditLogger) Info(msg string) (err error)

func (*AuditLogger) Warning

func (log *AuditLogger) Warning(msg string) (err error)

func (*AuditLogger) WarningErr

func (log *AuditLogger) WarningErr(msg error) (err error)

Warning formats an error for the Warn level.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL