Skip to content

Latest commit

 

History

History
69 lines (46 loc) · 2.29 KB

README.md

File metadata and controls

69 lines (46 loc) · 2.29 KB

emoji-logger

Codacy Badge Go Report Card GoDoc

Package logger is a custom logger package to output colorized emoji output to the standard output. The programmer should feel free to trace log as much of the code.

Nicely color-coded in development (when a TTY is attached, otherwise just plain text): alt text

alt text

Installation

To install emoji-logger package, you need to install Go and set your Go workspace first.

  1. Download and install it:
$ go get -u github.com/vaibhavsingh97/emoji-logger
  1. Import it in your code:
import "github.com/vaibhavsingh97/emoji-logger"

Example

package main

import (
    "fmt"

    logger "github.com/vaibhavsingh97/emoji-logger"
)

func main() {
    logger.Level = 10
    // Timestamp Disabled
    logger.TimeStamps = false
    // Color output enabled
    logger.Color = true

    err := fmt.Errorf("It's a new Error")

    logger.Debug("This is a lifeline for software engineers")
    logger.Info("This helps software engineers while running application in prod")
    logger.Warning("Something unusual happended, but application is still running")
    logger.Error("Error %v", err)
    // Note: this does **NOT** exit!
    logger.Critical("Something very bad happened, application should be stopped")
    logger.Success("Hooray!! Application ran successfully")
}

Issues

You can report the bugs at the issue tracker

License

Built with ♥ by Vaibhav Singh(@vaibhavsingh97) under Apache License 2.0

You can find a copy of the License at https://github.com/vaibhavsingh97/emoji-logger/blob/master/LICENSE