Documentation
¶
Index ¶
- func CutMessageIfNeeded(message string) string
- func GenerateMessage(eventType, message, topic string) string
- func OutputError(err error, topic, msg string, args ...interface{})
- func OutputInfo(topic, msg string, args ...interface{})
- func OutputMessageType(messageType, topic, msg string, args ...interface{})
- func OutputSingleLine(message string, args ...interface{})
- func OutputSingleLineWithTopic(topic, message string, args ...interface{})
- func OutputWarning(topic, msg string, args ...interface{})
- func RemoveLineBreaks(input string) string
- func SetMaxMessageLength(newValue int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CutMessageIfNeeded ¶
func GenerateMessage ¶
func OutputError ¶
OutputError shows error as [ERROR] {error_message}, {message} [{topic}] e.g. [ERROR] Cannot write file "tt.txt", please check permissions 664 on folder /tmp/tt.txt [order_123] topic is needed to group logged event for certain process e.g. all events which happened to order_123 we also cut line separators because normally such messages are split by them as separate messages we also cut too long messages (more than maxMessageLength chars) because of the processing overhead for long outputs
func OutputInfo ¶
func OutputInfo(topic, msg string, args ...interface{})
OutputWarning shows warning as [INFO] {message} [{topic}] e.g. [INFO] Cannot send email [order_123]
func OutputMessageType ¶
func OutputMessageType(messageType, topic, msg string, args ...interface{})
OutputMessageType shows a message as [{messageType}] {message} [{topic}]
func OutputSingleLine ¶
func OutputSingleLine(message string, args ...interface{})
func OutputSingleLineWithTopic ¶
func OutputSingleLineWithTopic(topic, message string, args ...interface{})
func OutputWarning ¶
func OutputWarning(topic, msg string, args ...interface{})
OutputWarning shows warning as [WARNING] {message} [{topic}] e.g. [WARNING] Cannot send email [order_123]
func RemoveLineBreaks ¶
func SetMaxMessageLength ¶
func SetMaxMessageLength(newValue int)
Types ¶
This section is empty.