Documentation
¶
Index ¶
Constants ¶
View Source
const ( // AttributeKeyLanguage holds the key for the "Language" attribute. AttributeKeyLanguage = AttributeKey("Language") // AttributeKeyModel holds the key for the "Model" attribute. AttributeKeyModel = AttributeKey("Model") // AttributeKeyRepository holds the key for the "Repository" attribute. AttributeKeyRepository = AttributeKey("Repository") // AttributeKeyResultPath holds the key for the "ResultPath" attribute. AttributeKeyResultPath = AttributeKey("ResultPath") // AttributeKeyTask holds the key for the "Task" attribute. AttributeKeyTask = AttributeKey("Task") )
Variables ¶
This section is empty.
Functions ¶
func Attribute ¶ added in v0.6.0
func Attribute(key AttributeKey, value any) (attribute slog.Attr)
Attribute returns a logging attribute.
func CleanModelNameForFileSystem ¶ added in v0.6.0
CleanModelNameForFileSystem cleans a model name to be useable for directory and file names on the file system.
func CloseOpenLogFiles ¶ added in v0.6.0
func CloseOpenLogFiles()
CloseOpenLogFiles closes the files that were opened by some logger.
Types ¶
type AttributeKey ¶ added in v0.6.0
type AttributeKey string
AttributeKey defines a key for attributes handed to the structural logger.
type Logger ¶
Logger holds a logger to log to.
func Buffer ¶
func Buffer() (buffer *bytesutil.SynchronizedBuffer, logger *Logger)
Buffer returns a logger that writes to a buffer.
func (*Logger) PrintfWithoutMeta ¶ added in v1.0.0
PrintfWithoutMeta prints a message without any timestamp, log level or origin program counter.
Click to show internal directories.
Click to hide internal directories.