log

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 4 Imported by: 2 modules, 1 package

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.

Documentation

Overview

Package log provides logging implementation with hooks to send logs to Escape Platform

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHook added in v0.0.26

func AddHook(name string, callback func(Entry))

AddHook adds a named hook to the logger. The hook will be called with the level and message of the log entry. This function returns a unique ID for the hook, which can be used to remove the hook later.

func Debug

func Debug(format string, args ...any)

Debug log level

func Error

func Error(format string, args ...any)

Error log level

func Info

func Info(format string, args ...any)

Info log level

func RemoveHook added in v0.0.26

func RemoveHook(name string)

RemoveHook removes a hook from the logger. The hook will no longer be called with the level and message of the log entry.

func SetLevel

func SetLevel(level logrus.Level)

SetLevel sets the log level

func Trace

func Trace(format string, args ...any)

Trace log level

func Warn

func Warn(format string, args ...any)

Warn log level

Types

type Entry added in v0.1.16

type Entry struct {
	Level   logrus.Level `json:"level"`
	Message string       `json:"message"`
}

Entry is a log line

Jump to

Keyboard shortcuts

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