io

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2019 License: MPL-2.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CutMessageIfNeeded

func CutMessageIfNeeded(message string) string

func GenerateMessage

func GenerateMessage(eventType, message, topic string) string

func OutputError

func OutputError(err error, topic, msg string, args ...interface{})

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 RemoveLineBreaks(input string) string

func SetMaxMessageLength

func SetMaxMessageLength(newValue int)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL