Git Product home page Git Product logo

emoji-logger's Introduction

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

emoji-logger's People

Contributors

vaibhavsingh97 avatar codacy-badger avatar

Stargazers

Felipe Ryan avatar genix avatar Richard Jennings avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

afuuam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.