logger

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package logger is a standardised logger for use in usvc projects. Feel free to use it in your own projects!

Basic text logger:

```go
var log = logger.New()
log.Infof("hello world")
```

Example output:

INFO[2019-09-14T14:24:34]main.go:10/main hello world

Basic JSON logger:

```go
var log = logger.New()
log.Infof("hello world")
```

Example output:

{"@data":{},"@file":"main.go:10","@function":"main","@level":"info","@message":"hello world","@timestamp":"2019-09-14T14:24:31"}

For the full guide visit https://gitlab.com/usvc/modules/go/log

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(formats ...string) *logrus.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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