Documentation ¶
Index ¶
- func LoadConfig(path string, cfg any, envKeywordParsers map[string]envldr.Parser, ...) error
- func NewLogger(config LoggerConfig) (logger *log_level.Logger, out *os.File, err error)
- func NewUnixListener(path string, uid int, gid int, mode fs.FileMode) (listener *net.UnixListener, err error)
- func PrintInfo(items ...string)
- func ToJsonStr(v any) (str string)
- type LogFileError
- type LoggerConfig
- type SecretString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func NewLogger ¶
func NewLogger(config LoggerConfig) (logger *log_level.Logger, out *os.File, err error)
func NewUnixListener ¶
Types ¶
type LogFileError ¶
type LogFileError struct {
// contains filtered or unexported fields
}
func (*LogFileError) Error ¶
func (e *LogFileError) Error() string
func (*LogFileError) Unwrap ¶
func (e *LogFileError) Unwrap() error
type LoggerConfig ¶
type LoggerConfig struct { Level level.Level `json:"level" env_var:"LOGGER_LEVEL"` Utc bool `json:"utc" env_var:"LOGGER_UTC"` Path string `json:"path" env_var:"LOGGER_PATH"` FileName string `json:"file_name" env_var:"LOGGER_FILE_NAME"` Terminal bool `json:"terminal" env_var:"LOGGER_TERMINAL"` Microseconds bool `json:"microseconds" env_var:"LOGGER_MICROSECONDS"` Prefix string `json:"prefix" env_var:"LOGGER_PREFIX"` }
type SecretString ¶
type SecretString string
func (SecretString) MarshalJSON ¶
func (s SecretString) MarshalJSON() ([]byte, error)
func (SecretString) String ¶
func (s SecretString) String() string
func (*SecretString) UnmarshalJSON ¶
func (s *SecretString) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.