Versions in this module Expand all Collapse all v1 v1.1.0 Jul 10, 2024 Changes in this version + const DEFAULT_LOG_FLAG + const DEFAULT_LOG_LEVEL + const DEFAULT_LOG_PREFIX + var SessionIDKey = "__xorm_session_id" + var SessionKey = "__xorm_session_key" + var SessionShowSQLKey = "__xorm_show_sql" + type ContextLogger interface + Debugf func(format string, v ...interface{}) + Errorf func(format string, v ...interface{}) + Infof func(format string, v ...interface{}) + IsShowSQL func() bool + Level func() LogLevel + SetLevel func(l LogLevel) + ShowSQL func(show ...bool) + Warnf func(format string, v ...interface{}) + func NewLoggerAdapter(logger Logger) ContextLogger + type DiscardLogger struct + func (DiscardLogger) Debug(v ...interface{}) + func (DiscardLogger) Debugf(format string, v ...interface{}) + func (DiscardLogger) Error(v ...interface{}) + func (DiscardLogger) Errorf(format string, v ...interface{}) + func (DiscardLogger) Info(v ...interface{}) + func (DiscardLogger) Infof(format string, v ...interface{}) + func (DiscardLogger) IsShowSQL() bool + func (DiscardLogger) Level() LogLevel + func (DiscardLogger) SetLevel(l LogLevel) + func (DiscardLogger) ShowSQL(show ...bool) + func (DiscardLogger) Warn(v ...interface{}) + func (DiscardLogger) Warnf(format string, v ...interface{}) + type LogContext contexts.ContextHook + type LogLevel int + const LOG_DEBUG + const LOG_ERR + const LOG_INFO + const LOG_OFF + const LOG_UNKNOWN + const LOG_WARNING + type Logger interface + Debug func(v ...interface{}) + Debugf func(format string, v ...interface{}) + Error func(v ...interface{}) + Errorf func(format string, v ...interface{}) + Info func(v ...interface{}) + Infof func(format string, v ...interface{}) + IsShowSQL func() bool + Level func() LogLevel + SetLevel func(l LogLevel) + ShowSQL func(show ...bool) + Warn func(v ...interface{}) + Warnf func(format string, v ...interface{}) + type LoggerAdapter struct + func (l *LoggerAdapter) AfterSQL(ctx LogContext) + func (l *LoggerAdapter) BeforeSQL(ctx LogContext) + func (l *LoggerAdapter) Debugf(format string, v ...interface{}) + func (l *LoggerAdapter) Errorf(format string, v ...interface{}) + func (l *LoggerAdapter) Infof(format string, v ...interface{}) + func (l *LoggerAdapter) IsShowSQL() bool + func (l *LoggerAdapter) Level() LogLevel + func (l *LoggerAdapter) SetLevel(lv LogLevel) + func (l *LoggerAdapter) ShowSQL(show ...bool) + func (l *LoggerAdapter) Warnf(format string, v ...interface{}) + type SQLLogger interface + AfterSQL func(context LogContext) + BeforeSQL func(context LogContext) + type SimpleLogger struct + DEBUG *log.Logger + ERR *log.Logger + INFO *log.Logger + WARN *log.Logger + func NewSimpleLogger(out io.Writer) *SimpleLogger + func NewSimpleLogger2(out io.Writer, prefix string, flag int) *SimpleLogger + func NewSimpleLogger3(out io.Writer, prefix string, flag int, l LogLevel) *SimpleLogger + func (s *SimpleLogger) Debug(v ...interface{}) + func (s *SimpleLogger) Debugf(format string, v ...interface{}) + func (s *SimpleLogger) Error(v ...interface{}) + func (s *SimpleLogger) Errorf(format string, v ...interface{}) + func (s *SimpleLogger) Info(v ...interface{}) + func (s *SimpleLogger) Infof(format string, v ...interface{}) + func (s *SimpleLogger) IsShowSQL() bool + func (s *SimpleLogger) Level() LogLevel + func (s *SimpleLogger) SetLevel(l LogLevel) + func (s *SimpleLogger) ShowSQL(show ...bool) + func (s *SimpleLogger) Warn(v ...interface{}) + func (s *SimpleLogger) Warnf(format string, v ...interface{}) + type SyslogLogger struct — darwin/amd64, js/wasm, linux/amd64 + func NewSyslogLogger(w *syslog.Writer) *SyslogLogger + func (s *SyslogLogger) Debug(v ...interface{}) + func (s *SyslogLogger) Debugf(format string, v ...interface{}) + func (s *SyslogLogger) Error(v ...interface{}) + func (s *SyslogLogger) Errorf(format string, v ...interface{}) + func (s *SyslogLogger) Info(v ...interface{}) + func (s *SyslogLogger) Infof(format string, v ...interface{}) + func (s *SyslogLogger) IsShowSQL() bool + func (s *SyslogLogger) Level() LogLevel + func (s *SyslogLogger) SetLevel(l LogLevel) + func (s *SyslogLogger) ShowSQL(show ...bool) + func (s *SyslogLogger) Warn(v ...interface{}) + func (s *SyslogLogger) Warnf(format string, v ...interface{})