simple concurrent logger

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]
Similar Resources

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

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

Oct 2, 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

Oct 7, 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

Sep 26, 2022

A 12-factor app logger built for performance and happy development

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

Nov 27, 2022

A logger for Go SQL database driver without modify existing *sql.DB stdlib usage.

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

Jan 3, 2023

xlog is a logger for net/context aware HTTP applications

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

Sep 26, 2022

Zero Allocation JSON Logger

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

Jan 1, 2023

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

Dec 14, 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

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

Sep 17, 2022
Simple logger for Go programs. Allows custom formats for messages.
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/

Dec 17, 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

Sep 26, 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

Sep 23, 2022
๐Ÿชต A dead simple, pretty, and feature-rich logger for golang
๐Ÿชต 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

Jul 20, 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

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

Jul 25, 2022
A simple and super power logger for golang
A simple and super power logger for golang

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

Oct 18, 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

Dec 14, 2022