package
0.0.0-20241104015319-85e10345cc4a
Repository: https://github.com/qida/gohp.git
Documentation: pkg.go.dev

# README

更新记录

2023-01-28

  • 更新 更换logrotate工具包为lumberjack,重点支持log文件gzip压缩,以减小日志文件过大问题
  • 更新 调整部分logger配置项
    loggerCfg:
    caller: true
    console: true
    level: "debug"
    logs:
      # 文件路径
      path: "logs/service-manager.log"
      # 最大保留天数,单位:天,默认:7天
      maxAge: 30
      # 文件分割大小,单位:MB,默认:100MB
      size: 100
      # 最大保留文件数量,默认:0为全部保留
      count: 0
      # 是否使用UTC时间
      isUTC: false 
      # 是否启用gzip压缩
      isGzip: true
    file:
    # 文件模式默认启用压缩且不使用UTC时间,如需支持请完善相应代码
      - path: "logs/debug.log"
        # 保存日志级别
        level: "debug"
        # 最大保留天数,单位:天,默认:7天
        maxAge: 7
        # 文件分割大小,单位:MB,默认:100MB
        size: 500
        # 最大保留文件数量,默认:0为全部保留
        count: 0
      - path: "logs/info.log"
        level: "info"
        maxAge: 30
    

# Packages

No description provided by the author

# Functions

AddSkip 临时增加跳转层级.
Debug .
Debugf .
Default .
No description provided by the author
DPanic .
DPanicf .
Error .
Errorf .
Fatal .
Fatalf .
Info .
Infof .
No description provided by the author
No description provided by the author
No description provided by the author
New Logger.
NewProbeLog 初始化 数据探针.
No description provided by the author
NewRocketMQCore creates a Core that writes logs to a WriteSyncer.
NewWithMap new with map.
Stacktrace 临时开启堆栈输出.
Warn .
Warnf .
WithCaller 添加文件名、行号、函数名等.
No description provided by the author
No description provided by the author
WithFile 开启写入文件.
WithInitialFields 固定字段.
WithKafka 启用kafka后,日志将打入kafka.
WithLevel 指定日志级别.
WithLogs 开启写入单个文件.
WithLogs 开启写入单个文件 并且制定enCider.
WithMail 发送email 默认Level为DPanic.
WithRocketMQ 启用RocketMQ.
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

操作 (列 : 具体的功能).
.
Log level.
Log level.
Log level.
Log level.
文件路径.
Log level.
方法 (列 : 具体的方法).
Log level.
集群ID.
服务ID.
服务名称.
名称.
事务 (列 : 整个视频的调用流程).
Log level.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LogDingding .
No description provided by the author
logger .
No description provided by the author
LogKafka 写入kafka.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Mail 发送邮件.
Message.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
Options .