log

package
v0.0.0-...-c6b2d99 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: LGPL-2.1 Imports: 8 Imported by: 1

Documentation

Overview

*

*

Index

Constants

View Source
const (
	LEVEL_DEBUG  = 0
	LEVEL_INFO   = 10
	LEVEL_NOTICE = 20
	LEVEL_WARN   = 30
	LEVEL_ERROR  = 40
	LEVEL_FETAL  = 50
)

Variables

This section is empty.

Functions

func Debug

func Debug(text string)

func Debugf

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

func Error

func Error(text string)

func Errorf

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

func GetLevelString

func GetLevelString(level int32) string

func Info

func Info(text string)

func Infof

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

func Warn

func Warn(text string)

func Warnf

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

Types

type LogText

type LogText struct {
	Datetime  string  `json:"datetime,omitempty"`
	Timestamp float64 `json:"timestamp,omitempty"`
	LevelInt  int32   `json:"levelInt,omitempty"`
	LevelStr  string  `json:"levelStr,omitempty"`
	File      string  `json:"file,omitempty"`
	Line      int32   `json:"line,omitempty"`
	Function  string  `json:"function,omitempty"`
	Text      string  `json:"text"`
}

func ParseLogText

func ParseLogText(text string) (ret LogText, err error)

Jump to

Keyboard shortcuts

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