Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerInit ¶
func LoggerInit(config LoggerGoConfig, additionalAttrs ...any) (*slog.Logger, error)
The LoggerInit function initializes a logger with the provided configuration and additional attributes.
Types ¶
type LoggerGoConfig ¶
type LoggerGoConfig struct { Level string `json:"level"` Format string `json:"format"` Dev bool `json:"dev"` }
The LoggerGoConfig type is a configuration struct for a logger in Go, with fields for level, format, and dev mode. @property {string} Level - The "Level" property in the LoggerGoConfig struct represents the logging level. It determines the severity of the log messages that will be recorded. Common levels include "debug", "info", "warning", "error", and "fatal". @property {string} Format - The `Format` property in the `LoggerGoConfig` struct represents the desired format for the log messages. It specifies how the log messages should be formatted when they are written to the log output. @property {bool} Dev - The `Dev` property is a boolean flag that indicates whether the logger is running in development mode or not. It can be used to enable or disable certain logging features or behaviors specific to development environments.