GormLog

package module
v0.0.0-...-785a4d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

README

AyaLog/Module/GormLog

AyaLog的GormLog模块

Documentation

Overview

* @Author: NyanCatda * @Date: 2022-05-22 02:31:00 * @LastEditTime: 2022-11-27 16:10:54 * @LastEditors: NyanCatda * @Description: Gorm日志模块 * @FilePath: \GormLog\GormLog.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormLog

type GormLog struct {
	Log AyaLog.LogPrint // 日志接口实例
}

func (GormLog) Error

func (G GormLog) Error(ctx context.Context, msg string, data ...interface{})

*

  • @description: 打印Error日志
  • @param {context.Context} ctx 上下文
  • @param {string} msg 日志内容
  • @param {...interface{}} data 日志内容
  • @return {*}

func (GormLog) Info

func (G GormLog) Info(ctx context.Context, msg string, data ...interface{})

*

  • @description: 打印Info日志
  • @param {context.Context} ctx 上下文
  • @param {string} msg 日志内容
  • @param {...interface{}} data 日志内容
  • @return {*}

func (GormLog) LogMode

func (g GormLog) LogMode(logger.LogLevel) logger.Interface

*

  • @description: 日志模型
  • @param {logger.LogLevel} LogLevel 日志等级
  • @return {*}

func (GormLog) Trace

func (G GormLog) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)

*

  • @description: 打印Trace日志
  • @param {context.Context} ctx 上下文
  • @param {time.Time} begin 开始时间
  • @param {func() (string, int64)} fc 函数
  • @param {error} err 错误
  • @return {*}

func (GormLog) Warn

func (G GormLog) Warn(ctx context.Context, msg string, data ...interface{})

*

  • @description: 打印Warning日志
  • @param {context.Context} ctx 上下文
  • @param {string} msg 日志内容
  • @param {...interface{}} data 日志内容
  • @return {*}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL