Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category string
const ( General Category = "General" IO Category = "IO" Internal Category = "Internal" Postgres Category = "Postgres" Redis Category = "Redis" Validation Category = "Validation" RequestResponse Category = "RequestResponse" Prometheus Category = "Prometheus" OS Category = "OS" Request Category = "Request" Controller Category = "Controller" )
type ExtraKey ¶
type ExtraKey string
const ( AppName ExtraKey = "AppName" LoggerName ExtraKey = "Logger" ClientIp ExtraKey = "ClientIp" HostIp ExtraKey = "HostIp" Method ExtraKey = "Method" StatusCode ExtraKey = "StatusCode" BodySize ExtraKey = "BodySize" Path ExtraKey = "Path" Latency ExtraKey = "Latency" RequestBody ExtraKey = "RequestBody" ResponseBody ExtraKey = "ResponseBody" ErrorMessage ExtraKey = "ErrorMessage" )
type Logger ¶
type Logger interface { Init() 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" SystemKill SubCategory = "SystemKill" // Postgres Migration SubCategory = "Migration" Select SubCategory = "Select" Rollback SubCategory = "Rollback" Update SubCategory = "Update" Delete SubCategory = "Delete" Insert SubCategory = "Insert" // Internal Api SubCategory = "Api" HashPassword SubCategory = "HashPassword" DefaultRoleNotFound SubCategory = "DefaultRoleNotFound" // Validation MobileValidation SubCategory = "MobileValidation" PasswordValidation SubCategory = "PasswordValidation" // IO RemoveFile SubCategory = "RemoveFile" // Controller Subscribe SubCategory = "Subscribe" MarshalTask SubCategory = "MarshalTask" UnmarshalTask SubCategory = "UnmarshalTask" QueueTask SubCategory = "QueueTask" Leader SubCategory = "Leader" )
Click to show internal directories.
Click to hide internal directories.