logging

package
v0.0.0-...-7aac46a Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 2 Imported by: 0

README

logging

Documentation

Overview

Logging provides logging facilities. It can use 3rd party package to provide functionalities compatible with Elastic search, Logstash, StatsD and .... .

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...interface{})

Debug is a function that logs a debug entry.

func Error

func Error(msg string, args ...interface{})

Error is a function that logs a debug entry.

func FDebug

func FDebug(fn string, msg string, args ...interface{})

FDebug is a function that logs a debug entry.

func FError

func FError(fn string, msg string, args ...interface{})

FError is a function that logs a debug entry.

func FFatal

func FFatal(fn string, msg string, args ...interface{})

FFatal is a function that logs a debug entry.

func FInfo

func FInfo(fn string, msg string, args ...interface{})

FInfo is a function that logs a debug entry.

func FWarn

func FWarn(fn string, msg string, args ...interface{})

FWarn is a function that logs a debug entry.

func Fatal

func Fatal(msg string, args ...interface{})

Fatal is a function that logs a debug entry.

func Info

func Info(msg string, args ...interface{})

Info is a function that logs a debug entry.

func Log

func Log(lvl int, msf string, args []interface{})

Log is a function that logs a debug entry.

func Trace

func Trace(msg string, args ...interface{})

Trace is a function that logs a debug entry.

func Warn

func Warn(msg string, args ...interface{})

Warn is a function that logs a debug entry.

Types

type Logging

type Logging struct {
	Package string
	// contains filtered or unexported fields
}

Logging is the default logging mechanism

func NewLogger

func NewLogger(pkg string) *Logging

NewLogger returns a pointer to a compatible `protobase.LoggingInterface`.

func (*Logging) Debug

func (l *Logging) Debug(msg string, args ...interface{})

Debug logs a debug entry.

func (*Logging) Debugf

func (l *Logging) Debugf(msg string, args ...interface{})

Debug logs a debug entry.

func (*Logging) Error

func (l *Logging) Error(msg string, args ...interface{})

Error logs a debug entry.

func (*Logging) Errorf

func (l *Logging) Errorf(msg string, args ...interface{})

Error logs a debug entry.

func (*Logging) FDebug

func (l *Logging) FDebug(fn string, msg string, args ...interface{})

FDebug logs a entry with caller name prepended.

func (*Logging) FDebugf

func (l *Logging) FDebugf(fn string, msg string, args ...interface{})

func (*Logging) FError

func (l *Logging) FError(fn string, msg string, args ...interface{})

FError logs a entry with caller name prepended.

func (*Logging) FErrorf

func (l *Logging) FErrorf(fn string, msg string, args ...interface{})

FError logs a entry with caller name prepended.

func (*Logging) FFatal

func (l *Logging) FFatal(fn string, msg string, args ...interface{})

FFatal logs a entry with caller name prepended.

func (*Logging) FFatalf

func (l *Logging) FFatalf(fn string, msg string, args ...interface{})

FFatal logs a entry with caller name prepended.

func (*Logging) FInfo

func (l *Logging) FInfo(fn string, msg string, args ...interface{})

FInfo logs a entry with caller name prepended.

func (*Logging) FInfof

func (l *Logging) FInfof(fn string, msg string, args ...interface{})

FInfo logs a entry with caller name prepended.

func (*Logging) FTrace

func (l *Logging) FTrace(level int, fn string, msg string, args ...interface{})

Trace logs a trace entry.

func (*Logging) FTracef

func (l *Logging) FTracef(level int, fn string, msg string, args ...interface{})

Trace logs a trace entry.

func (*Logging) FWarn

func (l *Logging) FWarn(fn string, msg string, args ...interface{})

FWarn logs a entry with caller name prepended.

func (*Logging) FWarnf

func (l *Logging) FWarnf(fn string, msg string, args ...interface{})

FWarn logs a entry with caller name prepended.

func (*Logging) Fatal

func (l *Logging) Fatal(msg string, args ...interface{})

Fatal logs a debug entry.

func (*Logging) Fatalf

func (l *Logging) Fatalf(msg string, args ...interface{})

Fatal logs a debug entry.

func (*Logging) Info

func (l *Logging) Info(msg string, args ...interface{})

Info logs a debug entry.

func (*Logging) Infof

func (l *Logging) Infof(msg string, args ...interface{})

Info logs a debug entry.

func (*Logging) IsDebug

func (l *Logging) IsDebug() bool

IsDebug returns wether logger running in a debugging environment.

func (*Logging) Log

func (l *Logging) Log(lvl int, msf string, args []interface{})

Log logs a debug entry.

func (*Logging) SetDebug

func (l *Logging) SetDebug(status bool)

SetDebug sets debug flag to `status`.

func (*Logging) Trace

func (l *Logging) Trace(level int, args ...interface{})

Trace logs a trace entry.

func (*Logging) Tracef

func (l *Logging) Tracef(level int, msg string, args ...interface{})

Trace logs a trace entry.

func (*Logging) Warn

func (l *Logging) Warn(msg string, args ...interface{})

Warn logs a debug entry.

func (*Logging) Warnf

func (l *Logging) Warnf(msg string, args ...interface{})

Warn logs a debug entry.

Jump to

Keyboard shortcuts

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