Versions in this module Expand all Collapse all v2 v2.3.3 Mar 12, 2021 Changes in this version + const FieldFile + const FieldFunc + const FieldLine + var Formatter = "json" + var LogDir = "logs" + var LogFileFormat = "YF.MPS-%Y%m%d%H%M.log" + var RecentLogFile = "YF.MPS-recent.log" + func Config(opts ...Option) error + func GetLogLevel() logrus.Level + func SetLogLevel(level logrus.Level) + type DBHook struct + IP string + IsConsole bool + KDB *gorm.DB + Service string + func (hook *DBHook) Fire(entry *logrus.Entry) error + func (hook *DBHook) Levels() []logrus.Level + type MicroHook struct + IP string + Service string + func (hook *MicroHook) Fire(entry *logrus.Entry) error + func (hook *MicroHook) Levels() []logrus.Level + type Option func(*Options) + func AddHook(hook logrus.Hook) Option + func AddHooks(hooks []logrus.Hook) Option + func SetReportCaller(isstart bool) Option + func Setlevel(level logrus.Level) Option + type Options struct + Hooks []logrus.Hook + Level logrus.Level + ReportCaller bool