Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewZapLogger ¶
NewZapLogger This constructor is to initialize zap logger and create zap instance. You can custom the log output. For default this constructor use stdout and file output to generate logs
Types ¶
type Context ¶
type Context struct { RequestTime time.Time ThreadID string `json:"_app_thread_id"` JourneyID string `json:"_app_journey_id"` ServiceName string `json:"_app_name"` ServiceVersion string `json:"_app_version"` IP string `json:"_IP"` ServicePort int `json:"_app_port"` ReqURI string `json:"_app_uri"` ReqMethod string `json:"_app_method"` SrcIP string `json:"_src_ip"` Header, Request interface{} AdditionalData map[string]interface{} `json:"_app_data,omitempty"` ErrorMessage string ResponseCode string Tag string `json:"_app_tag"` }
type ILogEngine ¶
type ILogEngine interface { Debug(ctx context.Context, message string) Info(ctx context.Context, message string) Warn(ctx context.Context, message string) Error(ctx context.Context, message string) Fatal(ctx context.Context, message string) Panic(ctx context.Context, message string) Close() error }
func NewLogEngine ¶
func NewLogEngine(conf LogConfig) (ILogEngine, error)
type SystemLogger ¶
type SystemLogger struct {
ILogEngine
}
func SetupLogger ¶
func SetupLogger(conf LogConfig) SystemLogger
Click to show internal directories.
Click to hide internal directories.