log

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: Apache-2.0 Imports: 4 Imported by: 1

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