Documentation ¶
Index ¶
- Constants
- func DumpStackTrace(logsPath string) crash.RecoveryAction
- func Init(logsPath, level string) error
- func LogFromContext(ctx context.Context) *logrus.Entry
- func MatchGUILogName(name string) bool
- func MatchLogName(name string) bool
- func MatchStackTraceName(name string) bool
- func Sensitive(s string) string
- func WithLogrusField(ctx context.Context, key string, value interface{}) context.Context
- type FileProvider
- type IMAPLogger
- type Rotator
- type SMTPDebugLogger
- type SMTPErrorLogger
Constants ¶
View Source
const ( // MaxLogSize defines the maximum log size we should permit: 5 MB // // The Zendesk limit for an attachement is 50MB and this is what will // be allowed via the API. However, if that fails for some reason, the // fallback is sending the report via email, which has a limit of 10mb // total or 7MB per file. Since we can produce up to 6 logs, and we // compress all the files (avarage compression - 80%), we need to have // a limit of 30MB total before compression, hence 5MB per log file. MaxLogSize = 5 * 1024 * 1024 // MaxLogs defines how many log files should be kept. MaxLogs = 3 )
Variables ¶
This section is empty.
Functions ¶
func DumpStackTrace ¶
func DumpStackTrace(logsPath string) crash.RecoveryAction
func MatchGUILogName ¶
func MatchLogName ¶
func MatchStackTraceName ¶
Types ¶
type FileProvider ¶
type FileProvider func() (io.WriteCloser, error)
type IMAPLogger ¶
type IMAPLogger struct{}
IMAPLogger implements the writer interface for Gluon IMAP logs.
func NewIMAPLogger ¶
func NewIMAPLogger() *IMAPLogger
type Rotator ¶
type Rotator struct {
// contains filtered or unexported fields
}
func NewRotator ¶
func NewRotator(maxSize int, getFile FileProvider) (*Rotator, error)
type SMTPDebugLogger ¶
type SMTPDebugLogger struct {
// contains filtered or unexported fields
}
SMTPDebugLogger implements the writer interface for debug SMTP logs.
func NewSMTPDebugLogger ¶
func NewSMTPDebugLogger() *SMTPDebugLogger
type SMTPErrorLogger ¶
type SMTPErrorLogger struct {
// contains filtered or unexported fields
}
SMTPErrorLogger implements go-smtp/logger interface.
func NewSMTPLogger ¶
func NewSMTPLogger() *SMTPErrorLogger
func (*SMTPErrorLogger) Printf ¶
func (s *SMTPErrorLogger) Printf(format string, args ...interface{})
func (*SMTPErrorLogger) Println ¶
func (s *SMTPErrorLogger) Println(args ...interface{})
Click to show internal directories.
Click to hide internal directories.