当前位置: 首页>>代码示例>>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;未经允许,请勿转载。