Skip to content

mysqto/log

Repository files navigation

golog

A full functional log package for golang with following features

  • enhanced but compatible with official log package. Simply using import alias to replace official log
package main

import (
    "bytes"
    "fmt"
    "github.com/mysqto/log"
)

func main() {
    var (
        buf    bytes.Buffer
        logger = log.New(&buf, "INFO: ", log.Lshortfile)

        infof = func(info string) {
            logger.Output(2, info)
        }
    )

    infof("Hello world")

    fmt.Print(&buf)
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published