Documentation ¶
Index ¶
- Variables
- func InitLog(accessLevel, accessLog, errorLevel, errorLog string) error
- func SetLogLevel(log *logrus.Logger, levelString string) error
- func SetLogOut(log *logrus.Logger, outString string) error
- type DefaultQueueLogger
- func (l DefaultQueueLogger) Error(args ...interface{})
- func (l DefaultQueueLogger) Errorf(format string, args ...interface{})
- func (l DefaultQueueLogger) Fatal(args ...interface{})
- func (l DefaultQueueLogger) Fatalf(format string, args ...interface{})
- func (l DefaultQueueLogger) Info(args ...interface{})
- func (l DefaultQueueLogger) Infof(format string, args ...interface{})
- type InputLog
- type LogPushEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LogAccess is log server request log LogAccess = logrus.New() // LogError is log server error log LogError = logrus.New() )
Functions ¶
func SetLogLevel ¶
SetLogLevel is define log level what you want log level: panic, fatal, error, warn, info and debug
Types ¶
type DefaultQueueLogger ¶
type DefaultQueueLogger struct {
// contains filtered or unexported fields
}
DefaultQueueLogger for queue custom logger
func (DefaultQueueLogger) Error ¶
func (l DefaultQueueLogger) Error(args ...interface{})
func (DefaultQueueLogger) Errorf ¶
func (l DefaultQueueLogger) Errorf(format string, args ...interface{})
func (DefaultQueueLogger) Fatal ¶
func (l DefaultQueueLogger) Fatal(args ...interface{})
func (DefaultQueueLogger) Fatalf ¶
func (l DefaultQueueLogger) Fatalf(format string, args ...interface{})
func (DefaultQueueLogger) Info ¶
func (l DefaultQueueLogger) Info(args ...interface{})
func (DefaultQueueLogger) Infof ¶
func (l DefaultQueueLogger) Infof(format string, args ...interface{})
type InputLog ¶
type InputLog struct { ID string Status string Token string Message string Platform int Error error HideToken bool HideMessage bool Format string }
InputLog log request
type LogPushEntry ¶
type LogPushEntry struct { ID string `json:"notif_id,omitempty"` Type string `json:"type"` Platform string `json:"platform"` Token string `json:"token"` Message string `json:"message"` Error string `json:"error"` }
LogPushEntry is push response log
func GetLogPushEntry ¶
func GetLogPushEntry(input *InputLog) LogPushEntry
GetLogPushEntry get push data into log structure
func LogPush ¶
func LogPush(input *InputLog) LogPushEntry
LogPush record user push request and server response.
Click to show internal directories.
Click to hide internal directories.