Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtraKey ¶
type ExtraKey string
const ( AppName ExtraKey = "AppName" LoggerName ExtraKey = "Logger" Service ExtraKey = "Service" UserId ExtraKey = "UserId" TraceId ExtraKey = "TraceId" ClientIp ExtraKey = "ClientIp" HostIp ExtraKey = "HostIp" Method ExtraKey = "Method" StatusCode ExtraKey = "StatusCode" BodySize ExtraKey = "BodySize" Path ExtraKey = "Path" Latency ExtraKey = "Latency" RequestBody ExtraKey = "RequestBody" RequestHeader ExtraKey = "RequestHeader" ResponseBody ExtraKey = "ResponseBody" ErrorMessage ExtraKey = "ErrorMessage" )
type Logger ¶
type Logger interface { Init(cfg *config.Config) Debug(cat Category, sub SubCategory, msg string, extra map[ExtraKey]interface{}) Debugf(template string, args ...interface{}) Info(cat Category, sub SubCategory, msg string, extra map[ExtraKey]interface{}) Infof(template string, args ...interface{}) Warn(cat Category, sub SubCategory, msg string, extra map[ExtraKey]interface{}) Warnf(template string, args ...interface{}) Error(cat Category, sub SubCategory, msg string, extra map[ExtraKey]interface{}) Errorf(template string, args ...interface{}) Fatal(cat Category, sub SubCategory, msg string, extra map[ExtraKey]interface{}) Fatalf(template string, args ...interface{}) }
type SubCategory ¶
type SubCategory string
const ( // General Startup SubCategory = "Startup" ExternalService SubCategory = "ExternalService" // Database Migration SubCategory = "Migration" Select SubCategory = "Select" DatabaseTimeout SubCategory = "DatabaseTimeout" Rollback SubCategory = "Rollback" Update SubCategory = "Update" Delete SubCategory = "Delete" Insert SubCategory = "Insert" //validation QuestionnaireValidationFailed SubCategory = "QuestionnaireValidationFailed" UserNotFound SubCategory = "UserNotFound" FailedToGenerateToken SubCategory = "FailedToGenerateToken" Api SubCategory = "Api" HashPassword SubCategory = "HashPassword" UserNotAuthorized SubCategory = "UserNotAuthorized" DefaultRoleNotFound SubCategory = "DefaultRoleNotFound" FailedToCreateUser SubCategory = "FailedToCreateUser" FailedToGetUsers SubCategory = "FailedToGetUsers" FailedToGetUserCount SubCategory = "FailedToGetUserCount" FailedToGetRole SubCategory = "FailedToGetRole" FailedConvertDto SubCategory = "FailedConvertDto" RecoverError SubCategory = "Recover Error" FailedToGetParticipation SubCategory = "FailedToGetParticipation" FailedToCreateParticipation SubCategory = "FailedToCreateParticipation" FailedToUpdateUser SubCategory = "FailedToUpdateUser" FailedToParseDate SubCategory = "FailedToParseDate" FailedToGetPermissions SubCategory = "FailedToGetPermissions" FailedToSendNotify SubCategory = "FailedToSendNotify" FailedToGetNotifications SubCategory = "FailedToGetNotifications" FailedToSeenNotifications SubCategory = "FailedToSeenNotifications" )
Click to show internal directories.
Click to hide internal directories.