Documentation ¶
Overview ¶
Copyright 2013 CoreOS, Inc. Copyright 2014 Yieldr
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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.
Copyright 2013 CoreOS, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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.
Copyright 2013 CoreOS, Inc. Copyright 2014 Yieldr
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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.
Copyright 2013 CoreOS, Inc. Copyright 2014 Yieldr
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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.
Copyright 2013 CoreOS, Inc. Copyright 2014 Yieldr
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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.
Copyright 2014 Yieldr ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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 ¶
- Variables
- func Alert(v ...interface{})
- func Alertf(format string, v ...interface{})
- func Critical(v ...interface{})
- func Criticalf(format string, v ...interface{})
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Emergency(v ...interface{})
- func Emergencyf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(v ...interface{})
- func FileSink(name string, format string, fields []string) (*fileSink, error)
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Notice(v ...interface{})
- func Noticef(format string, v ...interface{})
- func Panicf(format string, v ...interface{})
- func Panicln(v ...interface{})
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func SyslogSink(p Priority, format string, fields []string) (*syslogSink, error)
- func Warning(v ...interface{})
- func Warningf(format string, v ...interface{})
- type Fields
- type Logger
- func (logger *Logger) AddSink(s Sink)
- func (logger *Logger) Alert(v ...interface{})
- func (logger *Logger) Alertf(format string, v ...interface{})
- func (logger *Logger) Critical(v ...interface{})
- func (logger *Logger) Criticalf(format string, v ...interface{})
- func (logger *Logger) Debug(v ...interface{})
- func (logger *Logger) Debugf(format string, v ...interface{})
- func (logger *Logger) Emergency(v ...interface{})
- func (logger *Logger) Emergencyf(format string, v ...interface{})
- func (logger *Logger) Error(v ...interface{})
- func (logger *Logger) Errorf(format string, v ...interface{})
- func (logger *Logger) Fatalf(format string, v ...interface{})
- func (logger *Logger) Fatalln(v ...interface{})
- func (logger *Logger) Info(v ...interface{})
- func (logger *Logger) Infof(format string, v ...interface{})
- func (logger *Logger) Log(priority Priority, v ...interface{})
- func (logger *Logger) Logf(priority Priority, format string, v ...interface{})
- func (logger *Logger) Notice(v ...interface{})
- func (logger *Logger) Noticef(format string, v ...interface{})
- func (logger *Logger) Panicf(format string, v ...interface{})
- func (logger *Logger) Panicln(v ...interface{})
- func (logger *Logger) Printf(format string, v ...interface{})
- func (logger *Logger) Println(v ...interface{})
- func (logger *Logger) Warning(v ...interface{})
- func (logger *Logger) Warningf(format string, v ...interface{})
- type Priority
- type Sink
Constants ¶
This section is empty.
Variables ¶
var ( BasicFormat = "%s [%s] %s\n" BasicFields = []string{"time", "priority", "message"} RichFormat = "%s [%9s] %d %s - %s:%s:%d - %s\n" RichFields = []string{"full_time", "priority", "seq", "prefix", "filename", "funcname", "lineno", "message"} SyslogFormat = "[%s] %s\n" SyslogFields = []string{"priority", "message"} )
Functions ¶
func Emergencyf ¶
func Emergencyf(format string, v ...interface{})
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is user-immutable immutable struct which can log to several outputs
func New ¶
New creates a new Logger which logs to all the supplied sinks. The prefix argument is passed to all loggers under the field "prefix" with every log message. If verbose is true, more expensive runtime fields will be computed and passed to loggers. These fields are funcname, lineno, pathname, and filename.
func (*Logger) Emergencyf ¶
func (*Logger) Log ¶
This function has an unusual name to aid in finding it while walking the stack. We need to do some dead reckoning from this function to access the caller's stack, so there is a consistent call depth above this function.