loggly

package
v0.0.0-...-cf47146 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 3 Imported by: 2

README

Loggly

This package interfaces with the Loggly logging service.

Usage

The "LOGGLY_API_KEY" env variable must be set, or this will not work

There are multiple different types of log messages that can be sent, they are modeled after the log4j log messages:

func Error(message interface{}){}
func Warn(message interface{}){}
func Debug(message interface{}){}
func Info(message interface{}){}
func Trace(message interface{}){}

func ErrorEcho(message interface{}){}
func WarnEcho(message interface{}){}
func DebugEcho(message interface{}){}
func InfoEcho(message interface{}){}
func TraceEcho(message interface{}){}

Regular log functions just send the log message to Loggly.

Echo log functions send the log message to loggly, as well as print out the log message to the console.

These functions can also take in any types of structs or interfaces, e.g string, int, customo struct, etc.

Example

package main

import (
  "github.com/landonp1203/goUtils/loggly"
)

func main() {
  loggly.EchoDebug("Hey this is a debug message!")
}

Console Output:

2019/02/08 01:37:28 Tag: Debug
 Hey this is a debug message!

Documentation

Overview

Package loggly creates an interface to interact with the Loggly API and to allow users to easily send messages to Loggly

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(message interface{})

Debug log

func DebugEcho

func DebugEcho(message interface{})

Echo Debug log

func Error

func Error(message interface{})

Error log

func ErrorEcho

func ErrorEcho(message interface{})

Echo Error log

func Info

func Info(message interface{})

Info log

func InfoEcho

func InfoEcho(message interface{})

Echo Info log

func Trace

func Trace(message interface{})

Trace log

func TraceEcho

func TraceEcho(message interface{})

Echo Trace log

func Warn

func Warn(message interface{})

Warn log

func WarnEcho

func WarnEcho(message interface{})

Echo Warn log

Types

This section is empty.

Jump to

Keyboard shortcuts

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