Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(opts InitOptions)
Init initializes the global logger with the provided options. This function is safe to call multiple times - only the first call will initialize the logger. When TestingTB is provided, it initializes a test logger specific to that test.
Types ¶
type InitOptions ¶
type InitOptions struct {
StdOut *os.File
ArchiveDirectory string
LogMode io.LogMode
Theme themes.Theme
// TestingTB is used to set a testing.T instance for the logger.
// This is useful for capturing log output in tests.
TestingTB testing.TB
Logger io.Logger // Optional logger to use instead of creating a new one
}
Click to show internal directories.
Click to hide internal directories.