github.com/SupenBysz/gf-admin-community@v0.7.4/sys_service/sys_logs.go (about)

     1  // ================================================================================
     2  // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
     3  // You can delete these comments if you wish manually maintain this interface file.
     4  // ================================================================================
     5  
     6  package sys_service
     7  
     8  import (
     9  	"context"
    10  
    11  	"github.com/SupenBysz/gf-admin-community/sys_model/sys_entity"
    12  )
    13  
    14  type (
    15  	ISysLogs interface {
    16  		// Write 写日志
    17  		Write(ctx context.Context, err error, info sys_entity.SysLogs) error
    18  		// Write 写错误日志
    19  		Error(ctx context.Context, err error, info sys_entity.SysLogs) error
    20  		// ErrorSimple 写错误日志
    21  		ErrorSimple(ctx context.Context, err error, context string, category string) error
    22  		// Info 写日志信息
    23  		Info(ctx context.Context, err error, info sys_entity.SysLogs) error
    24  		// InfoSimple 写日志信息
    25  		InfoSimple(ctx context.Context, err error, context string, category string) error
    26  		// Warn 写警示日志
    27  		Warn(ctx context.Context, err error, info sys_entity.SysLogs) error
    28  		// WarnSimple 写警示日志
    29  		WarnSimple(ctx context.Context, err error, context string, category string) error
    30  	}
    31  )
    32  
    33  var (
    34  	localSysLogs ISysLogs
    35  )
    36  
    37  func SysLogs() ISysLogs {
    38  	if localSysLogs == nil {
    39  		panic("implement not found for interface ISysLogs, forgot register?")
    40  	}
    41  	return localSysLogs
    42  }
    43  
    44  func RegisterSysLogs(i ISysLogs) {
    45  	localSysLogs = i
    46  }