A simple and super power logger for golang

Overview

The most powerfull and faster logger for golang powered by DC


🤔 What is this?

Well this is a simple logger created with some tools and colors 😎

👀 How see this in action ?

  • Terminal color action

Terminal Usage

  • Json file generator

Json Image

⌨️ How install this ?

go get github.com/TeoDev1611/batman

👌 Examples

package main

import (
	"github.com/TeoDev1611/batman/log" // Import the log library
)

func main() {
	log.Config.AppName = "YourAppName" // Add the app name for the folder to create the logs
	log.Config.FileToLog = "filetolog.log" // Add the name for the file to write the logs ( JSON FORMAT )
	err := log.Init() // Init the app
	if err != nil {
		panic(err)          // Check the errors
	}
	log.Info("an example info") // Make a info level logger
	log.Warning("an example warning") // Make a warning logger
	log.Error("an example error") // Make a error logger
	log.Fatal("an example fatal") // Make a fatal
	print("this will be not printed") // WHY THIS NOT PRINT ( Make a os exit status 2 for the fatal)
  // DISABLE ?? Check the customization opts
}
  • Customization examples
package main

import (
	"github.com/TeoDev1611/batman/log" // Import the log library
)

func init(){
  log.LogOpts.Error = "CUSTOM_KEY_ERROR" // Custom the key for the json file in the error level DEFAULT: ERROR
  log.LogOpts.Info = "CUSTOM_KEY_INFO" // Custom the key for the json file in the info level DEFAULT: INFO
  log.LogOpts.Warning = "CUSTOM_KEY_WARN" // Custom the key for the json file in the warn level DEFAULT: WARN
  log.LogOpts.Fatal = "CUSTOM_KEY_FATAL" // Custom the key for the json file in the fatal level DEFAULT: FATAL

  log.LogOpts.ErrorExit = true // Exit the program with 2 code in the error logs DEFAULT: false
  log.LogOpts.FatalExit = true // Exit the program with 2 code in the fatal logs DEFAULT: true
}

📚 Steps to contribute

  1. Make a Fork to this repository
  2. Make a branch with the feature to add
  3. Use the conventional commits guide more information here
  4. Make a pull request with a explanation what you changes or features
  5. Review your pull request :shipit:
  6. Merge the pull request or request changes
  7. Done! 😃

📣 Credits

Special thanks to Ashley Willis were i stracted the gopher batman image here


Made with ❤️ in Ecuador

Releases(v0.2.0)
  • v0.2.0(Jan 8, 2022)

    The principal fix are delete the json support for fix the many keys with an item

    • Add the new photos
    • Fix the json and move to a log file
    • Change the format of the date
    • Add dprint json config
    • Add setup for the dprint tools
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Dec 21, 2021)

Owner
Teo
Dark ( Neo )Vimmer | ❤️ Open Source. Golang | Typescript | Python Developer
Teo
Logger - Simple logger without written with std pkg

Go-Logger Simple usage is: package main

MaskedTrench 2 Jan 2, 2022
Convenient Logger interface and std logger wrapper

Convenient logger interface and wrapper around std logger Interface type Logger interface { Error(err error) Debugf(format string, args ...interface

Denis Mitrofanov 1 Nov 28, 2021
Logger - A thin wrapper of uber-go/zap logger for personal project

a thin wraper of uber-go/zap logger for personal project 0. thanks uber-go/zap B

tsingson 1 Jun 16, 2022
The full power of the Go Compiler directly in your browser, including a virtual file system implementation. Deployable as a static website.

Static Go Playground Features Full Go Compiler running on the browser. Supports using custom build tags. Incremental builds (build cache). Supports mu

null 25 Jun 16, 2022
🪵 A dead simple, pretty, and feature-rich logger for golang

?? lumber ?? A dead simple, pretty, and feature-rich logger for golang ?? Install ?? Logging Functions lumber.Success() lumber.Info() lumber.Debug() l

Matt Gleich 49 May 26, 2022
Golog is a logger which support tracing and other custom behaviors out of the box. Blazing fast and simple to use.

GOLOG Golog is an opinionated Go logger with simple APIs and configurable behavior. Why another logger? Golog is designed to address mainly two issues

Damiano Petrungaro 34 Jun 22, 2022
A Simple logger for golang

go-logger Installation go get github.com/mo-taufiq/go-logger Quickstart package main import ( gologger "github.com/mo-taufiq/go-logger" ) func main

Moh Taufiqur Rohman 1 Jan 15, 2022
Cloudprober is a monitoring software that makes it super-easy to monitor availability and performance of various components of your system.

Cloudprober is a monitoring software that makes it super-easy to monitor availability and performance of various components of your system. Cloudprobe

null 154 Jul 2, 2022
Simple logger for Go programs. Allows custom formats for messages.

go-logger A simple go logger for easy logging in your programs. Allows setting custom format for messages. Preview Install go get github.com/apsdehal/

Amanpreet Singh 276 Jun 14, 2022
Simple Yet Powerful Logger

sypl sypl provides a Simple Yet Powerful Logger built on top of the Golang sypl. A sypl logger can have many Outputs, and each Output is responsible f

Sauce Labs 9 Apr 28, 2022
simple concurrent logger

XMUS-LOGGER pure golang logger compatible with golang io standards. USAGE : logOptions := logger.LoggerOptions{ LogLevel: 6, // read more about lo

amupxm [amir hossein mokarrami far] 5 Sep 19, 2021
A simple logger API.

flog a simple logger API for Go program that save logs into a file. NOTE: This package is provided "as is" with no guarantee. Use it at your own risk

Iss Meftah 3 May 14, 2022
A simple Go JSON logger.

logger A simple JSON logger for Go. It uses a context.Context to store values which will then be logged along with each message. It is possible to rec

Shawn Milochik 1 Dec 20, 2021
Simple Proof of Concept REST event logger.

REST Event Logger PoC I am working on this project intermittently. I have set myself a time limit of ~3hrs which includes the time to acquire and adap

Saad Ur Rahman 0 Feb 10, 2022
A feature-rich and easy to use logger for golang

A feature-rich and easy to use logger for golang ?? Install ?? Common Logs lumber.Success() lumber.Info() lumber.Debug() lumber.Warning()

Matthew Gleich 49 May 26, 2022
HTTP request logger for Golang

Horus ?? Introduction Horus is a request logger and viewer for Go. It allows developers log and view http requests made to their web application. Inst

Michael Okoh 78 Jun 5, 2022
A project that adds color to golang's logger module

logger A project that adds color to golang's log module Installation go get github.com/christopher18/logger Usage // Import the module import "github

null 0 Dec 28, 2021
Go-l3 - Lightweight Levelled Logger for Golang

Go-l3 - Lightweight Levelled Logger for Golang

nandlabs 1 Jan 20, 2022
A 12-factor app logger built for performance and happy development

logxi log XI is a structured 12-factor app logger built for speed and happy development. Simpler. Sane no-configuration defaults out of the box. Faste

Mario Gutierrez 348 Jun 25, 2022