log

package module
v0.0.0-...-0cff94f Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: MIT Imports: 5 Imported by: 3 modules, 34 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Logger CircleCI godoc Coverage Status Go Report Card codebeat badge

Simple logrus wrapper

Example Usage
package main

import (
	log "github.com/codeamp/logger"
)

func main() {
  log.InfoWithFields("hello", log.Fields{
    "world": "earth",
  })

  log.Println("Hello World")
  
  log.Debug("Hello World")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug logs a message at level Debug on the standard logger.

func DebugWithFields

func DebugWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func Error

func Error(args ...interface{})

Error logs a message at level Error on the standard logger.

func ErrorWithFields

func ErrorWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func Fatal

func Fatal(args ...interface{})

Fatal logs a message at level Fatal on the standard logger.

func FatalWithFields

func FatalWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func Info

func Info(args ...interface{})

Info logs a message at level Info on the standard logger.

func InfoWithFields

func InfoWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func Instance

func Instance() *logrus.Logger

func Panic

func Panic(args ...interface{})

Panic logs a message at level Panic on the standard logger.

func PanicWithFields

func PanicWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

func ParseLevel

func ParseLevel(level string) (logrus.Level, error)

func Println

func Println(args ...interface{})

Println logs a message at level Info on the standard logger.

func SetLogFormatter

func SetLogFormatter(formatter logrus.Formatter)

func SetLogLevel

func SetLogLevel(level logrus.Level)

func Warn

func Warn(args ...interface{})

Warn logs a message at level Warn on the standard logger.

func WarnWithFields

func WarnWithFields(l interface{}, f Fields)

Debug logs a message with fields at level Debug on the standard logger.

Types

type Fields

type Fields logrus.Fields

Fields wraps logrus.Fields, which is a map[string]interface{}

Jump to

Keyboard shortcuts

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