log

package
v1.24.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2016 License: MIT Imports: 1 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)
	NoneLevel    = LogLevel(999)
)

Variables

This section is empty.

Functions

func Access

func Access(from, to interface{}, status AccessStatus, reason interface{})

Access writes an access log.

func Close

func Close()

func Debug

func Debug(v ...interface{})

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

func Error

func Error(v ...interface{})

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

func Info

func Info(v ...interface{})

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

func InitAccessLogger

func InitAccessLogger(file string) error

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

func InitErrorLogger

func InitErrorLogger(file string) error

func SetLogLevel

func SetLogLevel(level LogLevel)

func Warning

func Warning(v ...interface{})

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

Types

type AccessStatus

type AccessStatus string

AccessStatus is the status of an access request from clients.

type LogLevel

type LogLevel int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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