effectindex / tripreporter

A community-powered and universal platform for submitting and analyzing trip reports.
https://subjective.report
Other
8 stars 2 forks source link

Review logging priority #28

Open 5HT2 opened 1 year ago

5HT2 commented 1 year ago

I want to go over all the logging in the application backend and ensure proper log levels are being used.

Based on this

const (
    // DebugLevel logs are typically voluminous, and are usually disabled in
    // production.
    DebugLevel = zapcore.DebugLevel
    // InfoLevel is the default logging priority.
    InfoLevel = zapcore.InfoLevel
    // WarnLevel logs are more important than Info, but don't need individual
    // human review.
    WarnLevel = zapcore.WarnLevel
    // ErrorLevel logs are high-priority. If an application is running smoothly,
    // it shouldn't generate any error-level logs.
    ErrorLevel = zapcore.ErrorLevel
    // DPanicLevel logs are particularly important errors. In development the
    // logger panics after writing the message.
    DPanicLevel = zapcore.DPanicLevel
    // PanicLevel logs a message, then panics.
    PanicLevel = zapcore.PanicLevel
    // FatalLevel logs a message, then calls os.Exit(1).
    FatalLevel = zapcore.FatalLevel
)
5HT2 commented 1 year ago

Moving this to 1.1.0 as it does not affect release.