package
0.0.0-20210516215220-b2b82d6194fc
Repository: https://github.com/tomekwlod/utils.git
Documentation: pkg.go.dev

# README

Extended *log.Logger lib

Import the library

import (
    ml "github.com/tomekwlod/utils/logger"
)

Simple usage

func main() {
    multi := io.MultiWriter(file, os.Stdout)

    l := ml.New(
        os.Getenv("LOGGING_MODE"),
        log.New(multi, "", log.Ldate|log.Ltime|log.Lshortfile),
    )

    l.Debugln("Debug message")
    l.Println("Info")
}

Todo

So far there are only three additional methods to print out the debug. Later I may implement more levels, but for the most cases the debug is really enough.