All Projects → nikoksr → Simplog

nikoksr / Simplog

Licence: gpl-3.0
A simple logger. No dependencies, no special features, just logging.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Simplog

Acho
The Hackable Log
Stars: ✭ 189 (+1011.76%)
Mutual labels:  simple, logging, logger
Caterpillar
Caterpillar is the ultimate logging system for Deno, Node.js, and Web Browsers. Log levels are implemented to the RFC standard. Log entries can be filtered and piped to various streams, including coloured output to the terminal, the browser's console, and debug files. You can even write your own transforms.
Stars: ✭ 330 (+1841.18%)
Mutual labels:  logging, logger
G3log
G3log is an asynchronous, "crash safe", logger that is easy to use with default logging sinks or you can add your own. G3log is made with plain C++14 (C++11 support up to release 1.3.2) with no external libraries (except gtest used for unit tests). G3log is made to be cross-platform, currently running on OSX, Windows and several Linux distros. See Readme below for details of usage.
Stars: ✭ 677 (+3882.35%)
Mutual labels:  logging, logger
Laravel Logger
An out the box activity logger for your Laravel or Lumen application. Laravel logger is an activity event logger for your laravel application. It comes out the box with ready to use with dashboard to view your activity. Laravel logger can be added as a middleware or called through a trait. This package is easily configurable and customizable. Supports Laravel 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6, and 7+
Stars: ✭ 366 (+2052.94%)
Mutual labels:  logging, logger
Logbook
An extensible Java library for HTTP request and response logging
Stars: ✭ 822 (+4735.29%)
Mutual labels:  logging, logger
Analog
PHP logging library that is highly extendable and simple to use.
Stars: ✭ 314 (+1747.06%)
Mutual labels:  logging, logger
Cocoadebug
iOS Debugging Tool 🚀
Stars: ✭ 3,769 (+22070.59%)
Mutual labels:  logging, logger
gxlog
A concise, functional, flexible and extensible logger for go.
Stars: ✭ 65 (+282.35%)
Mutual labels:  logger, logging
Onelog
Dead simple, super fast, zero allocation and modular logger for Golang
Stars: ✭ 389 (+2188.24%)
Mutual labels:  logging, logger
Concurrency Logger
Log HTTP requests/responses separately, visualize their concurrency and report logs/errors in context of a request.
Stars: ✭ 400 (+2252.94%)
Mutual labels:  logging, logger
Snoopy
Snoopy is a small library that logs all program executions on your Linux/BSD system (a.k.a. Snoopy Logger).
Stars: ✭ 835 (+4811.76%)
Mutual labels:  logging, logger
Nestjs Pino
Platform agnostic logger for NestJS based on Pino with REQUEST CONTEXT IN EVERY LOG
Stars: ✭ 283 (+1564.71%)
Mutual labels:  logging, logger
Tty Logger
A readable, structured and beautiful logging for the terminal
Stars: ✭ 280 (+1547.06%)
Mutual labels:  logging, logger
Tslog
📝 tslog - Expressive TypeScript Logger for Node.js.
Stars: ✭ 321 (+1788.24%)
Mutual labels:  logging, logger
Pygogo
A Python logging library with superpowers
Stars: ✭ 265 (+1458.82%)
Mutual labels:  logging, logger
Electron Timber
Pretty logger for Electron apps
Stars: ✭ 337 (+1882.35%)
Mutual labels:  logging, logger
Izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
Stars: ✭ 423 (+2388.24%)
Mutual labels:  logging, logger
logger
☠ 😈 👀 Simple,Secure & Undetected (6.11.2017) keylogger for Windows :)
Stars: ✭ 37 (+117.65%)
Mutual labels:  simple, logger
node-perj
A fast, flexible JSON logger.
Stars: ✭ 16 (-5.88%)
Mutual labels:  simple, logger
Monolog
Requirements
Stars: ✭ 19,361 (+113788.24%)
Mutual labels:  logger, logging
proji logo

Go Report Card Codacy Badge Maintainability Actions Status go.dev reference

A simple logger. No dependencies, no special features, just logging.

About

Simplog was created due to the unsuccessful search for a small and simple logging system. I needed a system that's exactly in the middle between 'does-what-it-should' and 'no-overkill'. Besides that I just wanted to write a logging library myself for fun.

If you like it and/or if it is useful for you, it has already more than fulfilled its purpose. Contributions are still welcome but just remember that this logger is intentionally kept simple.

Install

go get -u github.com/nikoksr/simplog

Example Code

// Open log file
logPath := "simple.log"

f, err := os.OpenFile(logPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
	log.Fatalf("could not open log file %s. %v", logPath, err)
}

// Create logger
var l = simplog.New("Core", false, f)
if err != nil {
    log.Fatalf("could not create logger %v", err)
}

// Set lowest log level to info
l.SetLevel(simplog.Info)

// Log messages with different levels of importance.
l.Info("You're awesome!")
l.Warning("Coffee is almost empty.")

// The following message will not be logged because 'Info' was set
// as the lowest allowed log level.
//
// Log Levels (lowest -> highest):
//  - Debug
//  - Info
//  - Warning
//  - Error
//  - Fatal
// 
// Log messages support fmt.Printf style by default.
l.Debug("%d should be equal to %d.", aNumber, anotherNumber)

Example Output

CORE 2020/03/18 17:13:24 main.go:24: INFO You're awesome!
CORE 2020/03/18 17:13:24 main.go:26: WARN Coffee is almost empty.    

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].