log

package
v0.0.0-...-a36a0c4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2014 License: MIT Imports: 5 Imported by: 6

Documentation

Overview

log的简单封装 我所期待的log接口(我在工作环境熟悉的)是这样的: 1. 日志分为多个文件,一个普通INFO日志,一个DEBUG,另外一个是WARN,ERROR,FATAL类型 2. INFO一般不采用调用一次打一行日志 3. INFO一般一次逻辑处理只打一行 4. 除了INFO之外,其它每调用一次,输出一行日志.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(arg0 interface{}, args ...interface{}) error

func Error

func Error(arg0 interface{}, args ...interface{}) error

func Info

func Info(arg0 interface{}, args ...interface{}) error

func LoadConfiguration

func LoadConfiguration(confPath string) error

func Warn

func Warn(arg0 interface{}, args ...interface{}) error

Types

type GooseLogger

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

func NewGooseLogger

func NewGooseLogger() *GooseLogger

func (GooseLogger) Debug

func (GooseLogger) Debug(arg0 interface{}, args ...interface{}) error

func (GooseLogger) Error

func (GooseLogger) Error(arg0 interface{}, args ...interface{}) error

func (*GooseLogger) Info

func (this *GooseLogger) Info(arg ...interface{}) error

Info日志先存起来,调用PrintAllInfo的时候输出日志 支持日常用法 Info(object,xxx) : 输出一个对象的字符串化表示,忽略后面的参数 Info(string) : 直接输出 Info(strA,strB) : 输出strA:strB Info(strA,object) : 输出strA : object.string()

func (*GooseLogger) PrintAllInfo

func (this *GooseLogger) PrintAllInfo() error

输出全部Info日志

func (GooseLogger) Warn

func (GooseLogger) Warn(arg0 interface{}, args ...interface{}) error

Jump to

Keyboard shortcuts

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