Documentation ¶
Index ¶
- type Event
- type Interface
- type Logger
- func (l *Logger) Debug() *Event
- func (l *Logger) Err(err error) *Event
- func (l *Logger) Error() *Event
- func (l *Logger) ErrorSpan(span trace.Span) *Event
- func (l *Logger) Fatal() *Event
- func (l *Logger) Info() *Event
- func (l *Logger) Log() *Event
- func (l Logger) Output(w io.Writer) Logger
- func (l *Logger) Panic() *Event
- func (l *Logger) Print(v ...interface{})
- func (l *Logger) Printf(format string, v ...interface{})
- func (l *Logger) Span(span trace.Span) *Event
- func (l *Logger) Trace() *Event
- func (l *Logger) Warn() *Event
- func (l *Logger) WithLevel(level zerolog.Level) *Event
- func (l Logger) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Trace() *Event Debug() *Event Info() *Event Warn() *Event Error() *Event Fatal() *Event Panic() *Event Err(error) *Event Log() *Event Span(trace.Span) *Event ErrorSpan(trace.Span) *Event Print(...interface{}) Printf(string, ...interface{}) Write(p []byte) (n int, err error) Output(io.Writer) Logger }
Interface -.
type Logger ¶
func NewDevelopmentLogger ¶
NewDevelopmentLogger returns a configured logger for development. It outputs debug level and above logs without sampling. The logger is configured to output logs in the format expected by Google Cloud Logging. The projectID parameter specifies the ID of the Google Cloud project to which the logs will be sent.
func NewProductionLogger ¶
NewProductionLogger returns a configured logger for production. It outputs info level and above logs with sampling. The logger is configured to output logs in the format expected by Google Cloud Logging. The projectID parameter specifies the ID of the Google Cloud project to which the logs will be sent.