Skip to content

Package emoji logger is a custom logger package to output colorized emoji output to the standard output

License

Notifications You must be signed in to change notification settings

vaibhavsingh97/emoji-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Package emoji logger is a custom logger package to output colorized emoji output to the standard output

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages