logger

package
v0.0.0-...-d86056c Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: Apache-2.0 Imports: 1 Imported by: 9

README

日志

级别
  • Trace(args ...interface{}) 打印trace级别日志

  • Debug(args ...interface{}) Debug 打印debug级别日志

  • Info(args ...interface{}) 打印info级别日志

  • Warn(args ...interface{}) 打印warn级别日志

  • Error(args ...interface{}) 打印error级别日志

  • Fatal(args ...interface{}) 打印critial级别日志

  • Tracef(format string, args ...interface{}) 打印trace级别日志

  • Debugf(format string, args ...interface{}) Debug 打印debug级别日志

  • Infof(format string, args ...interface{}) 打印info级别日志

  • Warnf(format string, args ...interface{}) 打印warn级别日志

  • Errorf(format string, args ...interface{}) 打印error级别日志

  • Fatalf(format string, args ...interface{}) 打印critial级别日志

配置
  • 日志配置方法
func ConfigAsFile(filename string) error

注意: 不调用配置方法,日志默认打印到终端。

  • 配置日志打印到文件
<seelog>
    <outputs>
        <file path="test.log"/>
    </outputs>
</seelog>

Documentation

Overview

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigAsBytes

func ConfigAsBytes(data []byte) error

ConfigAsBytes 配置内容

func ConfigAsFile

func ConfigAsFile(filename string) error

ConfigAsFile 配置文件

func Debug

func Debug(args ...interface{})

Debug 打印debug级别日志

func Debugf

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

Debug 打印debug级别日志

func Error

func Error(args ...interface{})

Error 打印error级别日志

func Errorf

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

Error 打印error级别日志

func Fatal

func Fatal(args ...interface{})

Fatal 打印critial级别日志

func Fatalf

func Fatalf(format string, args ...interface{})

Fatal 打印critial级别日志

func Flush

func Flush()

Flush 刷新日志

func Info

func Info(args ...interface{})

Info 打印info级别日志

func Infof

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

Info 打印info级别日志

func Trace

func Trace(args ...interface{})

Trace 打印trace级别日志

func Tracef

func Tracef(format string, args ...interface{})

Trace 打印trace级别日志

func Warn

func Warn(args ...interface{})

Warn 打印warn级别日志

func Warnf

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

Warn 打印warn级别日志

Types

This section is empty.

Jump to

Keyboard shortcuts

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