log

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessAccepted = AccessStatus("accepted")
	AccessRejected = AccessStatus("rejected")
)
View Source
const (
	DebugLevel   = LogLevel(0)
	InfoLevel    = LogLevel(1)
	WarningLevel = LogLevel(2)
	ErrorLevel   = LogLevel(3)
)

Variables

This section is empty.

Functions

func Access added in v0.9.1

func Access(from, to string, status AccessStatus, reason string)

Access writes an access log.

func Debug

func Debug(format string, v ...interface{})

Debug outputs a debug log with given format and optional arguments.

func Error

func Error(format string, v ...interface{})

Error outputs an error log with given format and optional arguments.

func Info

func Info(format string, v ...interface{})

Info outputs an info log with given format and optional arguments.

func InitAccessLogger added in v0.9.1

func InitAccessLogger(file string) error

InitAccessLogger initializes the access logger to write into the give file.

func InitErrorLogger added in v1.1.1

func InitErrorLogger(file string) error

func SetLogLevel

func SetLogLevel(level LogLevel)

func Warning

func Warning(format string, v ...interface{})

Warning outputs a warning log with given format and optional arguments.

Types

type AccessStatus added in v0.9.1

type AccessStatus string

AccessStatus is the status of an access request from clients.

type LogLevel

type LogLevel int

Jump to

Keyboard shortcuts

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