logger

package module
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: MIT Imports: 7 Imported by: 0

README

Coming soon

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugPtr *log.Logger
View Source
var TracePtr *log.Logger

Functions

This section is empty.

Types

type Log

type Log struct{}

func NewFileLogger

func NewFileLogger(logFile string, logLevel int) (*Log, error)

NewFileLogger func - creating new file logger.

Fields:

LogFile  - path to log file
LogLevel - log level, possible levels:
  0 - Emergency, with panic exit.
  1 - Alert, with exit 2.
  2 - Critical, with ext 1.
  3 - Errors.
  4 - Warnings.
  5 - Notice.
  6 - Info.
  7 - Debug.
  8 - Trace.

func (*Log) Alert

func (*Log) Alert(args ...interface{})

Alert logging a message using Alert (1) as log level and call os.Exit(1).

func (*Log) Alertf

func (*Log) Alertf(format string, args ...interface{})

Alertf logging a message using Alert (1) as log level and call os.Exit(1).

func (*Log) Crit

func (*Log) Crit(args ...interface{})

Crit logging a message using Crit (2) as log level and call os.Exit(1).

func (*Log) Critf

func (*Log) Critf(format string, args ...interface{})

Critf logging a message using Crit (2) as log level and call os.Exit(1).

func (*Log) Debug

func (l *Log) Debug(args ...interface{})

Debug logging a message using DEBUG as log level.

func (*Log) Debugf

func (l *Log) Debugf(format string, args ...interface{})

Debugf logging a message using DEBUG as log level.

func (*Log) Emerg

func (*Log) Emerg(args ...interface{})

Emerg logging a message using Emerg (0) as log level and call panic(fmt string).

func (*Log) Emergf

func (*Log) Emergf(format string, args ...interface{})

Emergf logging a message using Emerg (0) as log level and call panic(fmt string).

func (*Log) Err

func (*Log) Err(args ...interface{})

Err logging a message using Error (3) as log level.

func (*Log) Errf

func (*Log) Errf(format string, args ...interface{})

Errf logging a message using Error (3) as log level.

func (*Log) Info

func (*Log) Info(args ...interface{})

Info logging a message using Info (6) as log level.

func (*Log) Infof

func (*Log) Infof(format string, args ...interface{})

Infof logging a message using Info (6) as log level.

func (*Log) Notice

func (*Log) Notice(args ...interface{})

Notice logging a message using Notice (5) as log level.

func (*Log) Noticef

func (*Log) Noticef(format string, args ...interface{})

Noticef logging a message using Notice (5) as log level.

func (*Log) Trace

func (l *Log) Trace(msg string) func()

Trace logging a performance each function, usage defer trace("Message")()

func (*Log) Warn

func (*Log) Warn(args ...interface{})

Warn logging a message using Warn (4) as log level.

func (*Log) Warnf

func (*Log) Warnf(format string, args ...interface{})

Warnf logging a message using Warn (4) as log level.

Jump to

Keyboard shortcuts

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