Example #1
0
// GetLogger returns wlog.WrapLogger
func GetLogger(catalog string) *wlog.WrapLogger {
	return wlog.NewWrapLogger(catalog, 5)
}
Example #2
0
package main

import (
	"github.com/mabetle/mlog"
	"github.com/mabetle/mlog/wlog"
)

var (
	mlogApiLogger  = mlog.GetLogger("mlogApiLogger")         // api
	mlogWrapLogger = mlog.GetWrapLogger("mlogWrapLogger")    // mlog
	wlogApiLogger  = wlog.NewLogger("wlogApiLogger", 5)      // api
	wlogWrapLogger = wlog.NewWrapLogger("wlogWrapLogger", 5) //
)

func Demo() {
	mlogWrapLogger.Trace("Hello")
	mlogWrapLogger.Debug("Hello")
	mlogWrapLogger.Info("Hello")
	mlogWrapLogger.Warn("Hello")
	mlogWrapLogger.Error("Hello")

	mlogWrapLogger.Inspect()

	//wlogApiLogger.Error("Hello")
	//wlogWrapLogger.Error("Hello")
}

func main() {
	//mlog.SetTraceLevel()
	mlog.SetDebugLevel()
	//mlog.SetInfoLevel()
Example #3
0
func GetMainLogger() *wlog.WrapLogger {
	return wlog.NewWrapLogger("main", 5)
}