Documentation ¶
Overview ¶
Copyright 2013 tsuru authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Package log provides logging utility.
It abstracts the logger from the standard log package, allowing the developer to patck the logging target, changing this to a file, or syslog, for example.
Copyright 2013 tsuru authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
- Variables
- func Debug(v string)
- func Debugf(format string, v ...interface{})
- func Error(v string)
- func Errorf(format string, v ...interface{})
- func Fatal(v string)
- func Fatalf(format string, v ...interface{})
- func Init()
- func SetLogger(logger Logger)
- func Write(w io.Writer, content []byte) error
- type Logger
- type Target
- func (t *Target) Debug(v string)
- func (t *Target) Debugf(format string, v ...interface{})
- func (t *Target) Error(v string)
- func (t *Target) Errorf(format string, v ...interface{})
- func (t *Target) Fatal(v string)
- func (t *Target) Fatalf(format string, v ...interface{})
- func (t *Target) SetLogger(l Logger)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTarget = new(Target)
Functions ¶
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf is a wrapper for DefaultTarget.Debugf.
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf is a wrapper for DefaultTarget.Errorf.
Types ¶
type Logger ¶
type Logger interface { Error(string) Errorf(string, ...interface{}) Fatal(string) Fatalf(string, ...interface{}) Debug(string) Debugf(string, ...interface{}) }
func NewFileLogger ¶
func NewSyslogLogger ¶
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target is the current target for the log package.
Click to show internal directories.
Click to hide internal directories.