func main2() { log := logging.GetDefaultLogger("ckeyer test") log.Debug("heelosdf") log.Error("heleo") log.Info("helelo") log.Warning("hhhhh") }
// "github.com/ckeyer/LogC/routers" logpkg "github.com/ckeyer/go-log" "io" "net/http" "os" ) type Logger interface { io.Writer io.Reader } var ( logfile = "test.log" pool Logger log = logpkg.GetDefaultLogger() ) type Content struct { w http.ResponseWriter req *http.Request } func getFilePooler(name string) Logger { f, err := os.OpenFile(name, os.O_APPEND, 0600) if err != nil { log.Error(err.Error()) return nil } return f }
func init() { if log == nil { log = logpkg.GetDefaultLogger("blog") } }
func init() { log = logpkg.GetDefaultLogger() }