Versions in this module Expand all Collapse all v1 v1.0.2 May 13, 2022 Changes in this version + const AuthToken + const ClientCert + const ClientKey + const Endpoint + const EnvAuditWebhookAuthToken + const EnvAuditWebhookClientCert + const EnvAuditWebhookClientKey + const EnvAuditWebhookEnable + const EnvAuditWebhookEndpoint + const EnvAuditWebhookQueueSize + const EnvKafkaBrokers + const EnvKafkaClientTLSCert + const EnvKafkaClientTLSKey + const EnvKafkaEnable + const EnvKafkaSASLEnable + const EnvKafkaSASLMechanism + const EnvKafkaSASLPassword + const EnvKafkaSASLUsername + const EnvKafkaTLS + const EnvKafkaTLSClientAuth + const EnvKafkaTLSSkipVerify + const EnvKafkaTopic + const EnvKafkaVersion + const EnvLoggerWebhookAuthToken + const EnvLoggerWebhookClientCert + const EnvLoggerWebhookClientKey + const EnvLoggerWebhookEnable + const EnvLoggerWebhookEndpoint + const EnvLoggerWebhookQueueSize + const KafkaBrokers + const KafkaClientTLSCert + const KafkaClientTLSKey + const KafkaSASL + const KafkaSASLMechanism + const KafkaSASLPassword + const KafkaSASLUsername + const KafkaTLS + const KafkaTLSClientAuth + const KafkaTLSSkipVerify + const KafkaTopic + const KafkaVersion + const QueueSize + const TimeFormat + var BodyPlaceHolder = []byte("<BODY>") + var DefaultAuditKafkaKVS = config.KVS + var DefaultAuditWebhookKVS = config.KVS + var DefaultLoggerWebhookKVS = config.KVS + var Disable = false + var ErrCritical struct + var Help = config.HelpKVS + var HelpKafka = config.HelpKVS + var HelpWebhook = config.HelpKVS + 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 Error(msg string, data ...interface{}) + func Fatal(err error, msg string, data ...interface{}) + func FatalIf(err error, msg string, data ...interface{}) + func GetAuditEntry(ctx context.Context) *audit.Entry + func GetAuditKafka(kafkaKVS map[string]config.KVS) (map[string]kafka.Config, error) + 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 SetAuditEntry(ctx context.Context, audit *audit.Entry) context.Context + func SetDeploymentID(deploymentID string) + func SetLoggerHTTP(scfg config.Config, k string, args http.Config) + func SetLoggerHTTPAudit(scfg config.Config, k string, args http.Config) + func SetReqInfo(ctx context.Context, req *ReqInfo) context.Context + func StartupMessage(msg string, data ...interface{}) + func UpdateTargets(cfg Config) error + func ValidateSubSysConfig(scfg config.Config, subSys string) error + type Config struct + AuditKafka map[string]kafka.Config + AuditWebhook map[string]http.Config + Console Console + HTTP map[string]http.Config + func LookupConfig(scfg config.Config) (Config, error) + func NewConfig() Config + type Console struct + Enabled bool + 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 ObjectVersion struct + ObjectName string + VersionID string + type ReqInfo struct + API string + AccessKey string + BucketName string + DeploymentID string + Host string + ObjectName string + Objects []ObjectVersion + RemoteHost string + RequestID string + UserAgent string + VersionID 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 + Cancel func() + Endpoint func() string + Init func() error + Send func(entry interface{}, errKind string) error + String func() string + func AuditTargets() []Target + func Targets() []Target