Documentation ¶
Overview ¶
Package tracelog : logcalls.go provides formatting functions.
Package tracelog : logcalls.go provides formatting functions.
Package tracelog implements a logging system to trace all aspect of your code. This is great for task oriented programs. Based on the Go log standard library. It provides 4 destinations with logging levels plus you can attach a file for persistent writes. A log clean process is provided to maintain disk space. There is also email support to send email alerts.
Index ¶
- Constants
- func Alert(subject string, title string, functionName string, format string, ...)
- func Alertcd(callDepth int, subject string, title string, functionName string, ...)
- func Completed(title string, functionName string)
- func CompletedAlert(subject string, title string, functionName string, format string, ...)
- func CompletedAlertcd(callDepth int, subject string, title string, functionName string, ...)
- func CompletedError(err error, title string, functionName string)
- func CompletedErrorcd(callDepth int, err error, title string, functionName string)
- func CompletedErrorf(err error, title string, functionName string, format string, a ...interface{})
- func CompletedErrorfcd(callDepth int, err error, title string, functionName string, format string, ...)
- func Completedcd(callDepth int, title string, functionName string)
- func Completedf(title string, functionName string, format string, a ...interface{})
- func Completedfcd(callDepth int, title string, functionName string, format string, ...)
- func ConfigureEmail(host string, port int, userName string, password string, to []string)
- func Error(err error, title string, functionName string)
- func Errorcd(callDepth int, err error, title string, functionName string)
- func Errorf(err error, title string, functionName string, format string, a ...interface{})
- func Errorfcd(callDepth int, err error, title string, functionName string, format string, ...)
- func Info(title string, functionName string, format string, a ...interface{})
- func Infocd(callDepth int, title string, functionName string, format string, ...)
- func LogLevel() int32
- func SendEmailException(subject string, message string, a ...interface{}) error
- func Start(logLevel int32, ravenKey string)
- func StartF(logLevel int32, fileHandle io.Writer, ravenKey string)
- func StartFile(logLevel int32, baseFilePath string, daysToKeep int)
- func Started(title string, functionName string)
- func Startedcd(callDepth int, title string, functionName string)
- func Startedf(title string, functionName string, format string, a ...interface{})
- func Startedfcd(callDepth int, title string, functionName string, format string, ...)
- func Stop() error
- func Trace(title string, functionName string, format string, a ...interface{})
- func Tracecd(callDepth int, title string, functionName string, format string, ...)
- func Warning(title string, functionName string, format string, a ...interface{})
- func Warningcd(callDepth int, title string, functionName string, format string, ...)
Constants ¶
const ( // LevelTrace logs everything LevelTrace int32 = 1 // LevelInfo logs Info, Warnings and Errors LevelInfo int32 = 2 // LevelWarn logs Warning and Errors LevelWarn int32 = 4 // LevelError logs just Errors LevelError int32 = 8 )
Variables ¶
This section is empty.
Functions ¶
func Alertcd ¶
func Alertcd(callDepth int, subject string, title string, functionName string, format string, a ...interface{})
Alertcd write to the Error destination and sends email alert
func Completed ¶
Completed uses the Serialize destination and writes a Completed tag to the log line
func CompletedAlert ¶
func CompletedAlert(subject string, title string, functionName string, format string, a ...interface{})
CompletedAlert write to the Error destination, writes a Completed tag to the log line and sends email alert
func CompletedAlertcd ¶
func CompletedAlertcd(callDepth int, subject string, title string, functionName string, format string, a ...interface{})
CompletedAlertcd write to the Error destination, writes a Completed tag to the log line and sends email alert
func CompletedError ¶
CompletedError uses the Error destination and writes a Completed tag to the log line
func CompletedErrorcd ¶
CompletedErrorcd uses the Error destination and writes a Completed tag to the log line
func CompletedErrorf ¶
CompletedErrorf uses the Error destination and writes a Completed tag to the log line
func CompletedErrorfcd ¶
func CompletedErrorfcd(callDepth int, err error, title string, functionName string, format string, a ...interface{})
CompletedErrorfcd uses the Error destination and writes a Completed tag to the log line
func Completedcd ¶
Completedcd uses the Trace destination and writes a Completed tag to the log line
func Completedf ¶
Completedf uses the Serialize destination and writes a Completed tag to the log line
func Completedfcd ¶
func Completedfcd(callDepth int, title string, functionName string, format string, a ...interface{})
Completedfcd uses the Trace destination and writes a Completed tag to the log line
func ConfigureEmail ¶
ConfigureEmail configures the email system for use.
func Errorfcd ¶
func Errorfcd(callDepth int, err error, title string, functionName string, format string, a ...interface{})
Errorfcd writes to the Error destination and accepts an err
func SendEmailException ¶
SendEmailException will send an email along with the exception.
func StartFile ¶
StartFile initializes tracelog and only displays the specified logging level and creates a file to capture writes.
func Startedfcd ¶
Startedfcd uses the Trace destination and writes a Started tag to the log line
Types ¶
This section is empty.