logger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package logger provides logging functionality for the vulnerable target application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init initializes the global logger with the default info level. Deprecated: Use New() or NewWithLevel() with SetGlobal() instead.

func InitWithLevel

func InitWithLevel(verbosityLevel string)

InitWithLevel initializes the global logger with the specified verbosity level. Deprecated: Use New() or NewWithLevel() with SetGlobal() instead.

func New

func New(cfg *Config) zerolog.Logger

New creates a new zerolog.Logger with the given configuration. This is a pure factory function that returns a configured logger without modifying any global state. If cfg is nil, DefaultConfig() is used.

func NewWithLevel

func NewWithLevel(level string) zerolog.Logger

NewWithLevel creates a new zerolog.Logger with the specified level and default settings for other options.

func SetGlobal

func SetGlobal(logger zerolog.Logger)

SetGlobal sets the global log.Logger to the provided logger. This is the only function that modifies global state, and should be called once at application startup.

Types

type Config

type Config struct {
	Level      string
	Output     io.Writer
	TimeFormat string
	NoColor    bool
}

Config holds logger configuration options.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default logger configuration.

Jump to

Keyboard shortcuts

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