Versions in this module Expand all Collapse all v1 v1.0.2 Mar 17, 2021 Changes in this version + const AuthToken + const ClientCert + const ClientKey + const Endpoint + const EnvAuditWebhookAuthToken + const EnvAuditWebhookClientCert + const EnvAuditWebhookClientKey + const EnvAuditWebhookEnable + const EnvAuditWebhookEndpoint + const EnvLoggerWebhookAuthToken + const EnvLoggerWebhookEnable + const EnvLoggerWebhookEndpoint + const TimeFormat + var AuditTargets = []Target + var BodyPlaceHolder = []byte("<BODY>") + var DefaultAuditKVS = config.KVS + var DefaultKVS = config.KVS + var Disable = false + var ErrCritical struct + var Help = config.HelpKVS + var HelpAudit = config.HelpKVS + var Targets = []Target + func AddAuditTarget(t Target) error + func AddTarget(t Target) error + func AuditLog(ctx context.Context, w http.ResponseWriter, r *http.Request, ...) + func CriticalIf(ctx context.Context, err error, errKind ...interface{}) + func EnableAnonymous() + func EnableJSON() + func EnableQuiet() + func Fatal(err error, msg string, data ...interface{}) + func FatalIf(err error, msg string, data ...interface{}) + func Info(msg string, data ...interface{}) + func Init(goPath string, goRoot string) + func IsJSON() bool + func IsQuiet() bool + func LogAlwaysIf(ctx context.Context, err error, errKind ...interface{}) + func LogIf(ctx context.Context, err error, errKind ...interface{}) + func LogOnceIf(ctx context.Context, err error, id interface{}, errKind ...interface{}) + func RegisterError(f func(string, error, bool) string) + func SetDeploymentID(deploymentID string) + func SetLoggerHTTP(scfg config.Config, k string, args HTTP) + func SetLoggerHTTPAudit(scfg config.Config, k string, args HTTP) + func SetReqInfo(ctx context.Context, req *ReqInfo) context.Context + func StartupMessage(msg string, data ...interface{}) + type Config struct + Audit map[string]HTTP + Console Console + HTTP map[string]HTTP + func LookupConfig(scfg config.Config) (Config, error) + func NewConfig() Config + type Console struct + Enabled bool + type HTTP struct + AuthToken string + ClientCert string + ClientKey string + Enabled bool + Endpoint string + type KeyVal struct + Key string + Val interface{} + type Kind string + const All + const Application + const Minio + type Level int8 + const ErrorLvl + const FatalLvl + const InformationLvl + func (level Level) String() string + type Logger interface + type ReqInfo struct + API string + AccessKey string + BucketName string + DeploymentID string + Host string + ObjectName string + RemoteHost string + RequestID string + UserAgent string + func GetReqInfo(ctx context.Context) *ReqInfo + func NewReqInfo(remoteHost, userAgent, deploymentID, requestID, api, bucket, object string) *ReqInfo + func (r *ReqInfo) AppendTags(key string, val interface{}) *ReqInfo + func (r *ReqInfo) GetTags() []KeyVal + func (r *ReqInfo) GetTagsMap() map[string]interface{} + func (r *ReqInfo) SetTags(key string, val interface{}) *ReqInfo + type ResponseWriter struct + LogAllBody bool + LogErrBody bool + StartTime time.Time + StatusCode int + TimeToFirstByte time.Duration + func NewResponseWriter(w http.ResponseWriter) *ResponseWriter + func (lrw *ResponseWriter) Body() []byte + func (lrw *ResponseWriter) Flush() + func (lrw *ResponseWriter) Size() int + func (lrw *ResponseWriter) Write(p []byte) (int, error) + func (lrw *ResponseWriter) WriteHeader(code int) + type Target interface + Endpoint func() string + Send func(entry interface{}, errKind string) error + String func() string + Validate func() error