logrus

package
v0.0.0-...-235e7d4 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package logrus registers the global logrus logger to the pio ecosystem, install logrus first:

$ go get github.com/

Example Code:

package main

import (
	"github.com/kataras/pio"
	_ "github.com/kataras/pio/_examples/integrations/logrus"
)

func main() {
	pio.Print("This is an info message that will be printed to the logrus' output")
}

Index

Constants

View Source
const Name = "logrus"

Name of this printer.

Variables

This section is empty.

Functions

func Register

func Register(printf func(string, ...interface{})) *pio.Printer

Register registers a specific logrus printf-compatible function signature to the pio registry.

pio can take only one by-design because it is not based on any log levels but, you can extend it by calling its Hijack function to determinate what to log.

func Remove

func Remove()

Remove removes the logrus printer from the pio.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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