當前位置: 首頁>>代碼示例>>Golang>>正文


Golang mlog.GetLogger函數代碼示例

本文整理匯總了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")
)
開發者ID:mabetle,項目名稱:mdb,代碼行數:9,代碼來源:common.go

示例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")
}
開發者ID:mabetle,項目名稱:mcore,代碼行數:19,代碼來源:main.go

示例3:

package mtml

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

var logger = mlog.GetLogger("github.com/mabetle/mcore/mtml")
開發者ID:mabetle,項目名稱:mcore,代碼行數:7,代碼來源:common.go

示例4:

package sql_mysqld

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

var (
	logger = mlog.GetLogger("github.com/mabetle/mdb/sql_mysqld")
)
開發者ID:mabetle,項目名稱:mdb,代碼行數:9,代碼來源:logger.go

示例5:

package ini

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

var (
	logger = mlog.GetLogger("github.com/mabetle/mcore/mconf/ini")
)
開發者ID:mabetle,項目名稱:mcore,代碼行數:9,代碼來源:logger.go

示例6:

package mauth

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

var logger = mlog.GetLogger("github.com/mabetle/mauth")
開發者ID:mabetle,項目名稱:mauth,代碼行數:7,代碼來源:common.go

示例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()
開發者ID:mabetle,項目名稱:mlog,代碼行數:31,代碼來源:mlog_demo_main.go

示例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) {
開發者ID:mabetle,項目名稱:mcell,代碼行數:31,代碼來源:table.go

示例9:

package wxlsx

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

var (
	logger = mlog.GetLogger("github.com/mabetle/mcell/wxlsx")
)
開發者ID:mabetle,項目名稱:mcell,代碼行數:9,代碼來源:common.go


注:本文中的github.com/mabetle/mlog.GetLogger函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。