log

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: MIT Imports: 7 Imported by: 51

README

log

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(logType string, data ...interface{})

func Error

func Error(logType string, data ...interface{})

func Info

func Info(logType string, data ...interface{})

func LogRequest

func LogRequest(app, node, clientIp, fromApp, fromNode, clientId, sessionId, requestId, host string, authLevel, priority int, method, path string, requestHeaders map[string]string, requestData map[string]interface{}, usedTime float32, responseCode int, responseHeaders map[string]string, responseDataLength uint, responseData interface{}, extraInfo map[string]interface{})

func SetLevel

func SetLevel(level LevelType)

func SetTruncations

func SetTruncations(truncations ...string)

func SetWriter

func SetWriter(writer func(string))

func Warning

func Warning(logType string, data ...interface{})

Types

type LevelType

type LevelType int
const DEBUG LevelType = 1
const ERROR LevelType = 4
const INFO LevelType = 2
const WARNING LevelType = 3

type Logger

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

func (*Logger) Debug

func (logger *Logger) Debug(logType string, data ...interface{})

func (*Logger) Error

func (logger *Logger) Error(logType string, data ...interface{})

func (*Logger) Info

func (logger *Logger) Info(logType string, data ...interface{})

func (*Logger) LogRequest

func (logger *Logger) LogRequest(app, node, clientIp, fromApp, fromNode, clientId, sessionId, requestId, host string, authLevel, priority int, method, path string, requestHeaders map[string]string, requestData map[string]interface{}, usedTime float32, responseCode int, responseHeaders map[string]string, responseDataLength uint, responseData interface{}, extraInfo map[string]interface{})

func (*Logger) SetLevel

func (logger *Logger) SetLevel(level LevelType)

func (*Logger) SetTruncations

func (logger *Logger) SetTruncations(truncations ...string)

func (*Logger) SetWriter

func (logger *Logger) SetWriter(writer func(string))

func (*Logger) Warning

func (logger *Logger) Warning(logType string, data ...interface{})

Jump to

Keyboard shortcuts

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