tracer

package
v0.0.0-...-6edd512 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 0 Imported by: 3

Documentation

Overview

tracer package implement the way to trace the cln4go implementation without couple the library with any other library and leave this job to the end developer to choose how to trace the library

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyTracer

type DummyTracer struct{}

func (*DummyTracer) Info

func (self *DummyTracer) Info(msg string)

func (*DummyTracer) Infof

func (self *DummyTracer) Infof(msg string, args ...any)

func (*DummyTracer) Log

func (self *DummyTracer) Log(level TracerLevel, msg string)

func (*DummyTracer) Logf

func (self *DummyTracer) Logf(level TracerLevel, msg string, args ...any)

func (*DummyTracer) Trace

func (self *DummyTracer) Trace(msg string)

func (*DummyTracer) Tracef

func (self *DummyTracer) Tracef(msg string, args ...any)

type Tracer

type Tracer interface {
	/// Log a simple string without any fmt method
	Log(level TracerLevel, msg string)

	/// Logf print a generic message with the correct log level
	Logf(level TracerLevel, msg string, args ...any)

	/// Info log message at info level
	Info(msg string)

	/// Info log message at info level with fmt method
	Infof(msg string, args ...any)

	/// Trace log message at trace level
	Trace(msg string)

	/// Log message at trace level with fmt method
	Tracef(msg string, args ...any)
}

type TracerLevel

type TracerLevel int
const (
	Info TracerLevel = iota
	Debug
	Trace
	Error
)

Jump to

Keyboard shortcuts

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