simple concurrent logger

Overview

XMUS-LOGGER

pure golang logger compatible with golang io standards.

USAGE :

logOptions := logger.LoggerOptions{
	LogLevel: 6,    // read more about log levels in logLevel section
	Verbose:  true, // if true, print more detailed log messages and benchmark
	Std:      true, // if true, print log messages to stdout
}
log := logger.CreateLogger(&logOptions)
log.LogF("๐Ÿ“‘ %s \n", "your first log")

// Trace function caller
log.GetCaller().Alertln(" called me ")

// Or Trace call stack
log.Informln(" my cal stack is ").TraceStack()

// Or Use prefix :
prefixLogger := log.Prefix("Prefix", "log")
prefixLogger.AlertF("๐Ÿ“‘%s\n", "your first log with prefix")

prefixLogger.End()
log.End()

AVAILABLE METHODS :

// Log logs a message at log level
Logln(a ...interface{}) LogResult
// Logln logs a message at log level to new line
Log(a ...interface{}) LogResult
// LogF logs a message at log level with string formater
LogF(format string, a ...interface{}) LogResul


// Alert logs a message at log level
Alertln(a ...interface{}) LogResult
// Alertln logs a message at log level to new line
Alert(a ...interface{}) LogResult
// AlertF logs a message at log level with string formater
AlertF(format string, a ...interface{}) LogResul


// Error logs a message at log level
Error(a ...interface{}) LogResult
// Errorln logs a message at log level to new line
Errorln(a ...interface{}) LogResult
// ErrorF logs a message at log level with string formater
ErrorF(format string, a ...interface{}) LogResul


// Highlight logs a message at log level
Highlight(a ...interface{}) LogResult
// Highlightln logs a message at log level to new line
Highlightln(a ...interface{}) LogResult
// HighlightF logs a message at log level with string formater
HighlightF(format string, a ...interface{}) LogResul


// Inform logs a message at log level
Inform(a ...interface{}) LogResult
// Informln logs a message at log level to new line
Informln(a ...interface{}) LogResult
// InformF logs a message at log level with string formater
InformF(format string, a ...interface{}) LogResul


// Trace logs a message at log level
Trace(a ...interface{}) LogResult
// Traceln logs a message at log level to new line
Traceln(a ...interface{}) LogResult
// TraceF logs a message at log level with string formater
TraceF(format string, a ...interface{}) LogResul


// Warn logs a message at log level
Warn(a ...interface{}) LogResult
// Warnln logs a message at log level to new line
Warnln(a ...interface{}) LogResult
// WarnF logs a message at log level with string formater
WarnF(format string, a ...interface{}) LogResult

LogLevels :

LogLevel int (logLevelNumber) limits
Nothing 0 ban all logs
Alert 1 prints only alert and error
Error 1 prints only alert and error
Warn 2 prints warn and all in level 1
Highlight 3 prints Highlight and all in level 2
Inform 4 Inform and all in level 3
Log 5 prints logs and all in level 4
Trace 6 prints trace and all in level 5

BenchMark your app :

by using END on end of your app you can get kind of benchmark for your fun (Its not exactly benchmark , it only calculating time)

BEGIN : 


YourLogs...
...

END : 55.649ยตs
Owner
amupxm [amir hossein mokarrami far]
Aspiring Software Developer ๐Ÿ‘พ | Open Source Contributor ๐Ÿ”ฅ | Speaker ๐ŸŽ™๏ธ | Tech Writer โœ๏ธ
amupxm [amir hossein mokarrami far]
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
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
Dead simple, super fast, zero allocation and modular logger for Golang

Onelog Onelog is a dead simple but very efficient JSON logger. It is one of the fastest JSON logger out there. Also, it is one of the logger with the

Francois Parquet 399 Jun 16, 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
๐Ÿชต 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
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
A simple and super power logger for golang

The most powerfull and faster logger for golang powered by DC ?? What is this? W

Teo 7 Jan 23, 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
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
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 logger, for Go

Go-Log A logger, for Go! It's sort of log and code.google.com/p/log4go compatible, so in most cases can be used without any code changes. Breaking cha

Ian Kent 38 May 12, 2022
Loggly Hooks for GO Logrus logger

Loggly Hooks for Logrus Usage package main import ( "github.com/sirupsen/logrus" "github.com/sebest/logrusly" ) var logglyToken string = "YOUR_LOG

Sebest 27 Jul 27, 2021
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
A logger for Go SQL database driver without modify existing *sql.DB stdlib usage.

SQLDB-Logger A logger for Go SQL database driver without modify existing *sql.DB stdlib usage. Colored console writer output above only for sample/dev

Sarjono Mukti Aji 220 Jun 18, 2022
xlog is a logger for net/context aware HTTP applications

โš ๏ธ Check zerolog, the successor of xlog. HTTP Handler Logger xlog is a logger for net/context aware HTTP applications. Unlike most loggers, xlog will

Olivier Poitrey 135 Nov 22, 2021
Zero Allocation JSON Logger

Zero Allocation JSON Logger The zerolog package provides a fast and simple logger dedicated to JSON output. Zerolog's API is designed to provide both

Olivier Poitrey 6.5k Jun 25, 2022
A powerful zero-dependency json logger.

ZKits Logger Library About This package is a library of ZKits project. This is a zero-dependency standard JSON log library that supports structured JS

Qingshan Luo 16 Jun 15, 2022