Documentation
¶
Index ¶
- Constants
- Variables
- type Log
- func (d *Log) Debug(message string, args ...any)
- func (d *Log) Debugf(message string, args ...any)
- func (d *Log) Default(message string, args ...any)
- func (d *Log) Defaultf(message string, args ...any)
- func (d *Log) Error(message string, args ...any)
- func (d *Log) Errorf(message string, args ...any)
- func (d *Log) Fatal(message string, args ...any)
- func (d *Log) Fatalf(message string, args ...any)
- func (d *Log) Info(message string, args ...any)
- func (d *Log) Infof(message string, args ...any)
- func (d *Log) Prefix() string
- func (d *Log) Println(message string, args ...any)
- func (d *Log) Printlnf(message string, args ...any)
- func (d *Log) Question(message string, args ...any)
- func (d *Log) Questionf(message string, args ...any)
- func (d *Log) Secondary(message string, args ...any)
- func (d *Log) Secondaryf(message string, args ...any)
- func (d *Log) SetPrefix(prefix string)
- func (d *Log) Success(message string, args ...any)
- func (d *Log) Successf(message string, args ...any)
- func (d *Log) Warning(message string, args ...any)
- func (d *Log) Warningf(message string, args ...any)
Constants ¶
View Source
const ( Ldate int = log.Ldate // Print the date in the local time zone Ltime int = log.Ltime // Print the time in the local time zone Lmicroseconds int = log.Lmicroseconds // Print the time with microsecond precision Llongfile int = log.Llongfile // Print full file name and line number Lshortfile int = log.Lshortfile // Print final file name element and line number LUTC int = log.LUTC // Print date and time in UTC Lmsgprefix int = log.Lmsgprefix // Move the prefix from the beginning of the line to before the message LstdFlags int = log.LstdFlags // Standard flags: Ldate | Ltime )
Log flags that control the output format
Variables ¶
View Source
var ( DEBUG bool = false // Global debug flag Output io.Writer = os.Stderr // Default output writer Prefix string = "" // Default prefix for all loggers Flags int = 0 // Default flags for all loggers )
Global configuration variables
Functions ¶
This section is empty.
Types ¶
type Log ¶
Log represents a logger instance with enhanced functionality
func (*Log) Debugf ¶ added in v2.4.5
Debugf prints a formatted message with debug color if debug mode is enabled
func (*Log) Fatalf ¶ added in v2.4.5
Fatalf prints a formatted message with error color and exits the program
func (*Log) Secondaryf ¶ added in v2.4.5
Secondaryf prints a formatted message with secondary color
Click to show internal directories.
Click to hide internal directories.