package logger

import "github.com/nats-io/gnatsd/logger"

Package logger provides logging facilities for the NATS server

Package logger logs to the windows event log

Index

Functions

func SetSyslogName

func SetSyslogName(name string)

SetSyslogName sets the name to use for the system log event source

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger is the server logger

func NewFileLogger

func NewFileLogger(filename string, time, debug, trace, pid bool) *Logger

NewFileLogger creates a logger with output directed to a file

func NewStdLogger

func NewStdLogger(time, debug, trace, colors, pid bool) *Logger

NewStdLogger creates a logger with output directed to Stderr

func (*Logger) Close

func (l *Logger) Close() error

Close implements the io.Closer interface to clean up resources in the server's logger implementation. Caller must ensure threadsafety.

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...interface{})

Debugf logs a debug statement

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...interface{})

Errorf logs an error statement

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, v ...interface{})

Fatalf logs a fatal error

func (*Logger) Noticef

func (l *Logger) Noticef(format string, v ...interface{})

Noticef logs a notice statement

func (*Logger) Tracef

func (l *Logger) Tracef(format string, v ...interface{})

Tracef logs a trace statement

func (*Logger) Warnf

func (l *Logger) Warnf(format string, v ...interface{})

Warnf logs a notice statement

type SysLogger

type SysLogger struct {
	// contains filtered or unexported fields
}

SysLogger logs to the windows event logger

func NewRemoteSysLogger

func NewRemoteSysLogger(fqn string, debug, trace bool) *SysLogger

NewRemoteSysLogger creates a remote event logger

func NewSysLogger

func NewSysLogger(debug, trace bool) *SysLogger

NewSysLogger creates a log using the windows event logger

func (*SysLogger) Debugf

func (l *SysLogger) Debugf(format string, v ...interface{})

Debugf logs a debug statement

func (*SysLogger) Errorf

func (l *SysLogger) Errorf(format string, v ...interface{})

Errorf logs an error statement

func (*SysLogger) Fatalf

func (l *SysLogger) Fatalf(format string, v ...interface{})

Fatalf logs a fatal error

func (*SysLogger) Noticef

func (l *SysLogger) Noticef(format string, v ...interface{})

Noticef logs a notice statement

func (*SysLogger) Tracef

func (l *SysLogger) Tracef(format string, v ...interface{})

Tracef logs a trace statement

func (*SysLogger) Warnf

func (l *SysLogger) Warnf(format string, v ...interface{})

Noticef logs a notice statement

Source Files

log.go syslog_windows.go

Version
v1.4.1 (latest)
Published
Feb 7, 2019
Platform
windows/amd64
Imports
5 packages
Last checked
3 days ago

Tools for package owners.