logging

package module
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 40

README

logging

semantic-release Release license release Go Report Card

This project is in alpha state. It can AND will continue breaking until version 1.0.0 is released

What Is It

TBD

Supported Go Versions

For security reasons, we only support and recommend the use of one of the latest two Go versions (✅).
Versions that also build are marked with ⚠.

Version Supported
<1.15
1.15
1.16
1.17
1.18

License

The full functionality of this library is and stays open source and free to use for everyone. Visit our website and get in touch.

See the exact licensing terms here

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func Debugf

func Debugf(format string, args ...interface{})

func Debugln

func Debugln(args ...interface{})

func Error

func Error(args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func Errorln

func Errorln(args ...interface{})

func Fatal

func Fatal(args ...interface{})

func Fatalf

func Fatalf(format string, args ...interface{})

func Fatalln

func Fatalln(args ...interface{})

func Info

func Info(args ...interface{})

func Infof

func Infof(format string, args ...interface{})

func Infoln

func Infoln(args ...interface{})

func Logf

func Logf(level logrus.Level, format string, args ...interface{})

func Logln

func Logln(level logrus.Level, args ...interface{})

func Panic

func Panic(args ...interface{})

func Panicf

func Panicf(format string, args ...interface{})

func Panicln

func Panicln(args ...interface{})

func SetFormatter

func SetFormatter(formatter logrus.Formatter)

func SetGlobal

func SetGlobal()

func SetIDKey

func SetIDKey(key string)

SetIDKey key of id in logentry

func SetLevel

func SetLevel(level logrus.Level)

func SetOutput

func SetOutput(out io.Writer)

func Trace

func Trace(args ...interface{})

func Tracef

func Tracef(format string, args ...interface{})

func Traceln

func Traceln(args ...interface{})

func Warn

func Warn(args ...interface{})

func Warnf

func Warnf(format string, args ...interface{})

func Warning

func Warning(args ...interface{})

func Warningf

func Warningf(format string, args ...interface{})

func Warningln

func Warningln(args ...interface{})

func Warnln

func Warnln(args ...interface{})

Types

type Config

type Config struct {
	Level       string    `json:"level"`
	Formatter   formatter `json:"formatter"`
	LocalLogger bool      `json:"localLogger"`
}

func (*Config) SetLogger

func (c *Config) SetLogger() (err error)

func (*Config) UnmarshalJSON

func (c *Config) UnmarshalJSON(data []byte) error

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

type Entry

type Entry struct {
	*logrus.Entry
	// contains filtered or unexported fields
}

func Log deprecated

func Log(id string) *Entry

Deprecated: Log creates a new entry with an id

func LogWithFields deprecated

func LogWithFields(id string, fields ...interface{}) *Entry

Deprecated: LogWithFields creates a new entry with an id and the given fields

func New

func New() *Entry

New instantiates a new entry

func OnError

func OnError(err error) *Entry

func WithError added in v0.3.4

func WithError(err error) *Entry

func WithFields

func WithFields(fields ...interface{}) *Entry

WithFields creates a new entry without an id and the given fields

func (*Entry) Debug

func (e *Entry) Debug(args ...interface{})

func (*Entry) Debugf

func (e *Entry) Debugf(format string, args ...interface{})

func (*Entry) Debugln

func (e *Entry) Debugln(args ...interface{})

func (*Entry) Error

func (e *Entry) Error(args ...interface{})

func (*Entry) Errorf

func (e *Entry) Errorf(format string, args ...interface{})

func (*Entry) Errorln

func (e *Entry) Errorln(args ...interface{})

func (*Entry) Fatal

func (e *Entry) Fatal(args ...interface{})

func (*Entry) Fatalf

func (e *Entry) Fatalf(format string, args ...interface{})

func (*Entry) Fatalln

func (e *Entry) Fatalln(args ...interface{})

func (*Entry) Info

func (e *Entry) Info(args ...interface{})

func (*Entry) Infof

func (e *Entry) Infof(format string, args ...interface{})

func (*Entry) Infoln

func (e *Entry) Infoln(args ...interface{})

func (*Entry) Log

func (e *Entry) Log(level logrus.Level, args ...interface{})

func (*Entry) Logf

func (e *Entry) Logf(level logrus.Level, format string, args ...interface{})

func (*Entry) Logln

func (e *Entry) Logln(level logrus.Level, args ...interface{})

func (*Entry) OnError

func (e *Entry) OnError(err error) *Entry

OnError sets the error. The log will only be printed if err is not nil

func (*Entry) Panic

func (e *Entry) Panic(args ...interface{})

func (*Entry) Panicf

func (e *Entry) Panicf(format string, args ...interface{})

func (*Entry) Panicln

func (e *Entry) Panicln(args ...interface{})

func (*Entry) SetFields

func (e *Entry) SetFields(fields ...interface{}) *Entry

SetFields sets the given fields on the entry. It panics if length of fields is odd

func (*Entry) Trace

func (e *Entry) Trace(args ...interface{})

func (*Entry) Tracef

func (e *Entry) Tracef(format string, args ...interface{})

func (*Entry) Traceln

func (e *Entry) Traceln(args ...interface{})

func (*Entry) Warn

func (e *Entry) Warn(args ...interface{})

func (*Entry) Warnf

func (e *Entry) Warnf(format string, args ...interface{})

func (*Entry) Warning

func (e *Entry) Warning(args ...interface{})

func (*Entry) Warningf

func (e *Entry) Warningf(format string, args ...interface{})

func (*Entry) Warningln

func (e *Entry) Warningln(args ...interface{})

func (*Entry) Warnln

func (e *Entry) Warnln(args ...interface{})

func (*Entry) WithError

func (e *Entry) WithError(err error) *Entry

func (*Entry) WithField

func (e *Entry) WithField(key string, value interface{}) *Entry

func (*Entry) WithFields

func (e *Entry) WithFields(fields logrus.Fields) *Entry

func (*Entry) WithTime

func (e *Entry) WithTime(t time.Time) *Entry

Jump to

Keyboard shortcuts

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