logrusgce

package module
v0.0.0-...-d6f6f6d Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 1

README

logrus-gce

Google Cloud Engine Logging Formatter for Logrus

How to use

package main

import (
	log "github.com/sirupsen/logrus"
    logrusgce "github.com/znly/logrus-gce"
)

func main() {
    log.SetFormatter(logrusgce.NewGCEFormatter(true))
    log.WithField("myfield", "myvalue").Info("hey")
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSkipNotFound = errors.New("could not find skips for log level")
)

Functions

This section is empty.

Types

type GCEFormatter

type GCEFormatter struct {
	// contains filtered or unexported fields
}

func NewGCEFormatter

func NewGCEFormatter(withSourceInfo bool) *GCEFormatter

func (*GCEFormatter) Format

func (f *GCEFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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