logs

package module
v0.0.0-...-7cc0c93 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

README

logs

自用的简单日志记录,由于目前的代码都是通过 supervsion 部署的.自带了日志保存到文件和文件切割的功能,所以这里就不做处理了

使用方法

logs.Debug("hello")
更新记录

1. 独立日志包,使用系统log 库来做简单封装
2. 提供默认等级.并进行颜色配置

Documentation

Overview

** =============================================== ** USER NAME: garlic(QQ:3173413) ** FILE NAME: log.go ** DATE TIME: 2017-07-17 13:48:07 ** ===============================================

Index

Constants

View Source
const (
	LevelAlert = iota
	LevelCritical
	LevelError
	LevelWarning
	LevelNotice
	LevelInformational
	LevelDebug
)

Variables

This section is empty.

Functions

func Alert

func Alert(i ...interface{})

func Cirtical

func Cirtical(i ...interface{})

func Debug

func Debug(i ...interface{})

func Error

func Error(i ...interface{})

func Flags

func Flags() int

返回当前的打印标志位

func Info

func Info(i ...interface{})

func Notice

func Notice(i ...interface{})

func Prefix

func Prefix() string

返回前缀

func SetFlags

func SetFlags(flag int)

设置标志

func SetOutput

func SetOutput(w io.Writer)

定义日志输出位置

func SetPrefix

func SetPrefix(prefix string)

设置前缀

func Warning

func Warning(i ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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