Documentation
¶
Index ¶
- type GLog
- func (l *GLog) Close() error
- func (l *GLog) Debug(format string)
- func (l *GLog) Debugc(ctx context.Context, format string)
- func (l *GLog) Debugcf(ctx context.Context, format string, v ...interface{})
- func (l *GLog) Debugf(format string, v ...interface{})
- func (l *GLog) Error(format string)
- func (l *GLog) Errorc(ctx context.Context, format string)
- func (l *GLog) Errorcf(ctx context.Context, format string, v ...interface{})
- func (l *GLog) Errorf(format string, v ...interface{})
- func (l *GLog) Info(format string)
- func (l *GLog) Infoc(ctx context.Context, format string)
- func (l *GLog) Infocf(ctx context.Context, format string, v ...interface{})
- func (l *GLog) Infof(format string, v ...interface{})
- func (l *GLog) Panic(format string)
- func (l *GLog) Panicc(ctx context.Context, format string)
- func (l *GLog) Paniccf(ctx context.Context, format string, v ...interface{})
- func (l *GLog) Panicf(format string, v ...interface{})
- func (l *GLog) Warn(format string)
- func (l *GLog) Warnc(ctx context.Context, format string)
- func (l *GLog) Warncf(ctx context.Context, format string, v ...interface{})
- func (l *GLog) Warnf(format string, v ...interface{})
- func (l *GLog) WithField(field string, value interface{}) Logger
- func (l *GLog) WithFields(fields map[string]interface{}) Logger
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GLog ¶
type GLog struct {
// contains filtered or unexported fields
}
GLog is a logger implementation
func New ¶
func New() *GLog
New return a new logger It will lookup configuration from environment variables for initialization LOG_FORMAT can be text/json LOG_OUTPUT can be a file by setting value to file:///path/to/logfile if LOG_OUTPUT is different to a file, it will be redirect to os.Stdout.
func (*GLog) WithFields ¶
WithFields return a new logger with fields
type Logger ¶
type Logger interface { Info(format string) Debug(format string) Warn(format string) Error(format string) Panic(format string) Infof(format string, v ...interface{}) Debugf(format string, v ...interface{}) Warnf(format string, v ...interface{}) Errorf(format string, v ...interface{}) Panicf(format string, v ...interface{}) Infoc(ctx context.Context, format string) Debugc(ctx context.Context, format string) Warnc(ctx context.Context, format string) Errorc(ctx context.Context, format string) Panicc(ctx context.Context, format string) Infocf(ctx context.Context, format string, v ...interface{}) Debugcf(ctx context.Context, format string, v ...interface{}) Warncf(ctx context.Context, format string, v ...interface{}) Errorcf(ctx context.Context, format string, v ...interface{}) Paniccf(ctx context.Context, format string, v ...interface{}) WithField(field string, value interface{}) Logger WithFields(fields map[string]interface{}) Logger Close() error }
Logger is an interface of logging operations
Click to show internal directories.
Click to hide internal directories.