common

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2014 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package common contains data structures and constants shared between rlog and its modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMessage

func FormatMessage(rawRlogMsg *RlogMsg, prefix string, removeNewlines bool) string

FormatMessage generates a log message

func ReplaceNewlines

func ReplaceNewlines(msg string) string

ReplaceNewlines any tabs/newlines with double-space and removes indentations Arguments: a string for newline replacement Returns: string with #012 instead of newlines

func SyslogHeader

func SyslogHeader() string

SyslogHeader gathers environment information to generate a log prefix

Types

type RlogMsg

type RlogMsg struct {
	Msg        string       //log message
	Timestamp  string       //time of log generation (preformatted)
	Severity   RlogSeverity //log severity
	Pc         uint         //program counter position where log message was generated
	StackTrace string       //stack trace (for error and fatal only)
}

RlogMsg carries a formatted log message including some additional information.

type RlogSeverity

type RlogSeverity uint

RlogSeverity defines a type to represent severity levels for log messages

Jump to

Keyboard shortcuts

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