Documentation
¶
Index ¶
- Constants
- func AuditLog() *log.Logger
- func InitAuditLog(cfg *LogConfig) error
- func InitLog(cfg *LogConfig) error
- func InitLogInstance(logger *log.Logger, cfg *LogConfig) error
- func SetTenantID(tid string)
- func WriteFailedAuditLog(apiName string, reqFields map[string]interface{}, reason string)
- func WriteSimpleFailedAuditLog(apiName string, reqField interface{}, reason string)
- func WriteSimpleSucceededAuditLog(apiName string, reqField interface{}, respField interface{})
- func WriteSucceededAuditLog(apiName string, reqFields map[string]interface{}, ...)
- type LogConfig
Constants ¶
View Source
const ( Response_Succeeded string = "succeeded" Response_Failed string = "failed" Request_default_key string = "requestValue" Response_default_key string = "responseValue" Audit_Prefix string = "[AUDIT]" TenantID_key = "tenantid" Target_Index_Key = "target_index" )
View Source
const ( FORMATTER_TEXT = "text" FORMATTER_JSON = "json" )
Variables ¶
This section is empty.
Functions ¶
func InitLogInstance ¶
InitLogInstance initializes the specific logger instance
func WriteFailedAuditLog ¶
The request may have multiple contextual fields
func WriteSimpleFailedAuditLog ¶
The request has only one contextual field
Types ¶
Click to show internal directories.
Click to hide internal directories.