本文整理汇总了Golang中github.com/mabetle/mlog.GetLogger函数的典型用法代码示例。如果您正苦于以下问题:Golang GetLogger函数的具体用法?Golang GetLogger怎么用?Golang GetLogger使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetLogger函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
package sqlited
import (
"github.com/mabetle/mlog"
)
var (
logger = mlog.GetLogger("github.com/mabetle/mdb/sqlited")
)
示例2: main
package main
import (
"github.com/mabetle/mlog"
)
var (
logger = mlog.GetLogger("main")
)
func main() {
mlog.SetTraceLevel()
logger.Trace("Hello")
logger.Debug("Hello")
logger.Info("Hello")
logger.Warn("Hello")
logger.Error("Hello")
}
示例3:
package mtml
import (
"github.com/mabetle/mlog"
)
var logger = mlog.GetLogger("github.com/mabetle/mcore/mtml")
示例4:
package sql_mysqld
import (
"github.com/mabetle/mlog"
)
var (
logger = mlog.GetLogger("github.com/mabetle/mdb/sql_mysqld")
)
示例5:
package ini
import (
"github.com/mabetle/mlog"
)
var (
logger = mlog.GetLogger("github.com/mabetle/mcore/mconf/ini")
)
示例6:
package mauth
import (
"github.com/mabetle/mlog"
)
var logger = mlog.GetLogger("github.com/mabetle/mauth")
示例7: Demo
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()
示例8: CheckSimpleTableImpl
package xlsxsdb
import (
"fmt"
"github.com/mabetle/mcell/wxlsx"
"github.com/mabetle/mcore/msdb"
"github.com/mabetle/mlog"
)
var (
logger = mlog.GetLogger("github.com/mabetle/mcell/xlsxsdb")
)
// XlsxTable implements msdb.SimpleTable
type XlsxTable struct {
*msdb.BaseTable
sheet *wxlsx.Sheet
}
// CheckSimpleTableImpl check
func CheckSimpleTableImpl(file string, sheetName string) (msdb.SimpleTable, error) {
return NewXlsxTableBySheetName(file, sheetName)
}
// NewSimpleTableBySheetName returns XlsxTable
func NewSimpleTableBySheetName(file string, sheetName string) (*XlsxTable, error) {
return NewXlsxTableBySheetName(file, sheetName)
}
// NewSimpleTable returns XlsxTable
func NewSimpleTable(file string, sheetIndex int) (*XlsxTable, error) {
示例9:
package wxlsx
import (
"github.com/mabetle/mlog"
)
var (
logger = mlog.GetLogger("github.com/mabetle/mcell/wxlsx")
)