Documentation
¶
Index ¶
- func ByteToString(b []byte) string
- func HandlerWithoutAddSource(opts *slog.HandlerOptions)
- func Init_LoggerGFS(logFilePath string, writeLogs string, handlerOpts ...HandlerOptionsFunc) error
- func MapToJSON(s any) []byte
- func NewDefaultLogger(w io.Writer, handlerOpts ...HandlerOptionsFunc) error
- func NewLogger(w io.Writer, handlerOpts ...HandlerOptionsFunc) (*slog.Logger, error)
- func StructToJSON(s any) []byte
- func ValidMailAddress(address string) (string, bool)
- type HandlerOptionsFunc
- type WriterGFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteToString ¶
func HandlerWithoutAddSource ¶
func HandlerWithoutAddSource(opts *slog.HandlerOptions)
HandlerWithoutAddSource is the type used to set AddSource to false
func Init_LoggerGFS ¶
func Init_LoggerGFS(logFilePath string, writeLogs string, handlerOpts ...HandlerOptionsFunc) error
Init_LoggerGFS will handle the initialization of the logger and set it as the default
func NewDefaultLogger ¶
func NewDefaultLogger(w io.Writer, handlerOpts ...HandlerOptionsFunc) error
NewDefaultLogger to create, and define a new default logger
func StructToJSON ¶
func ValidMailAddress ¶
ValidMailAddress will check the validity of an email address
Types ¶
type HandlerOptionsFunc ¶
type HandlerOptionsFunc func(*slog.HandlerOptions)
HandlerOptionsFunc is the type used to define optional handler options
func HandlerWithLevel ¶
func HandlerWithLevel(l slog.Leveler) HandlerOptionsFunc
HandlerWithLevel is the type used to add an optional Leveler
func HandlerWithReplaceAttr ¶
HandlerWithLevel is the type used to add an optional ReplaceAttr
type WriterGFS ¶
type WriterGFS struct {
// contains filtered or unexported fields
}
LoggerGFS is a custom GFS logger
func NewWriterGFS ¶
NewWriterGFS returns a newly initialized WriterGFS struct pointers
Click to show internal directories.
Click to hide internal directories.