Documentation ¶
Overview ¶
Package log define and configure the Pydio loggers based on zap.
We mainly use 2 loggers that are defined in this package and used throughout the backend: - A syslog logger: it should be used to log technical information. - An audit logger: it only logs some very precise information at strategic places and is used to monitor the Application from a business point of view. Audit logs are among others used for GRDP compliance.
WARNING: you should not modify nor remove any of the audit log.
Index ¶
- Variables
- func Auditer(ctx context.Context) *zap.Logger
- func Debug(msg string, fields ...zapcore.Field)
- func Error(msg string, fields ...zapcore.Field)
- func Fatal(msg string, fields ...zapcore.Field)
- func GetAuditId(msgId string) zapcore.Field
- func Info(msg string, fields ...zapcore.Field)
- func Init()
- func Logger(ctx context.Context) *zap.Logger
- func RFC3369TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
- func RegisterWriteSyncer(syncer WriteSyncer)
- func TasksLogger(ctx context.Context) *zap.Logger
- type LogSyncer
- type WriteSyncer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetAuditId ¶
GetAuditId simply returns a zap field that contains this message id to ease audit log analysis.
func RFC3369TimeEncoder ¶
func RFC3369TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
RFC3369TimeEncoder serializes a time.Time to an RFC3339-formatted string
func RegisterWriteSyncer ¶ added in v1.6.2
func RegisterWriteSyncer(syncer WriteSyncer)
Register optional writers for logs
Types ¶
type LogSyncer ¶
type LogSyncer struct {
// contains filtered or unexported fields
}
func NewLogSyncer ¶
type WriteSyncer ¶ added in v1.6.2
Same as zapcore.WriteSyncer but without dependency