shared

package module
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataDir = "data"

Functions

func Execute

func Execute(commandStr string)

func ExecuteShellCommand

func ExecuteShellCommand(shellCommand string) error

func GetLogLevel added in v0.0.14

func GetLogLevel() string

func SetLogLevel added in v0.0.11

func SetLogLevel(logLevel string)

Types

type LogLevelValue

type LogLevelValue int
const (
	TRACE LogLevelValue = iota
	DEBUG
	INFO
	WARN
	ERROR
)

func (LogLevelValue) String

func (l LogLevelValue) String() string

type Logger

type Logger interface {
	Trace(message string, v ...any)
	Debug(message string, v ...any)
	Info(message string, v ...any)
	Warn(message string, v ...any)
	Error(message string, v ...any)
	Fatal(message string, v ...any)
}

func ProvideLogger

func ProvideLogger() Logger

type MyLogger

type MyLogger struct {
	Logger *zerolog.Logger
}

func (*MyLogger) Debug

func (m *MyLogger) Debug(format string, v ...any)

func (*MyLogger) Error

func (m *MyLogger) Error(format string, v ...any)

func (*MyLogger) Fatal

func (m *MyLogger) Fatal(format string, v ...any)

func (*MyLogger) Info

func (m *MyLogger) Info(format string, v ...any)

func (*MyLogger) Trace

func (m *MyLogger) Trace(format string, v ...any)

func (*MyLogger) Warn

func (m *MyLogger) Warn(format string, v ...any)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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