Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogger ¶
type AuditLogger interface { Log(ctx *fiber.Ctx, err error, body []byte, meta LogMeta) HangUp() error Shutdown() error }
func InitFileLogger ¶
func InitFileLogger(logname string) (AuditLogger, error)
InitFileLogger initializes audit logs to local file
func InitLogger ¶
func InitLogger(cfg *LogConfig) (AuditLogger, error)
func InitWebhookLogger ¶
func InitWebhookLogger(url string) (AuditLogger, error)
InitWebhookLogger initializes audit logs to webhook URL
type FileLogger ¶
type FileLogger struct {
// contains filtered or unexported fields
}
FileLogger is a local file audit log
func (*FileLogger) HangUp ¶
func (f *FileLogger) HangUp() error
HangUp closes current logfile handle and opens a new one typically needed for log rotations
type LogFields ¶
type LogFields struct { BucketOwner string Bucket string Time time.Time RemoteIP string Requester string RequestID string Operation string Key string RequestURI string HttpStatus int ErrorCode string BytesSent int ObjectSize int64 TotalTime int64 TurnAroundTime int64 Referer string UserAgent string VersionID string HostID string SignatureVersion string CipherSuite string AuthenticationType string HostHeader string TLSVersion string AccessPointARN string AclRequired string }
type WebhookLogger ¶
type WebhookLogger struct {
// contains filtered or unexported fields
}
WebhookLogger is a webhook URL audit log
func (*WebhookLogger) HangUp ¶
func (wl *WebhookLogger) HangUp() error
HangUp does nothing for webhooks
func (*WebhookLogger) Log ¶
func (wl *WebhookLogger) Log(ctx *fiber.Ctx, err error, body []byte, meta LogMeta)
Log sends log message to webhook
func (*WebhookLogger) Shutdown ¶
func (wl *WebhookLogger) Shutdown() error
Shutdown does nothing for webhooks
Click to show internal directories.
Click to hide internal directories.