All Projects → ichtrojan → Thoth

ichtrojan / Thoth

Licence: mit
An Error Logger for Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Thoth

Log Process Errors
Show some ❤️ to Node.js process errors
Stars: ✭ 424 (+1827.27%)
Mutual labels:  error-handling, logging, error
Tslog
📝 tslog - Expressive TypeScript Logger for Node.js.
Stars: ✭ 321 (+1359.09%)
Mutual labels:  error-handling, logging, logger
Node Lambda Log
Basic logging mechanism for Node 6.10+ Lambda Functions
Stars: ✭ 115 (+422.73%)
Mutual labels:  error-handling, logging, logger
Jslogger
Integrate JavaScript Logging with ASP.NET Core Logging APIs
Stars: ✭ 19 (-13.64%)
Mutual labels:  logging, logger
Error Overlay Webpack Plugin
Catch errors with style 💥✨
Stars: ✭ 821 (+3631.82%)
Mutual labels:  error-handling, error
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 (+1563.64%)
Mutual labels:  logging, logger
Onelog
Dead simple, super fast, zero allocation and modular logger for Golang
Stars: ✭ 389 (+1668.18%)
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 (+1718.18%)
Mutual labels:  logging, logger
Quill
Asynchronous Low Latency C++ Logging Library
Stars: ✭ 422 (+1818.18%)
Mutual labels:  logging, logger
Gf
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
Stars: ✭ 6,501 (+29450%)
Mutual labels:  logging, logger
Traceback with variables
Adds variables to python traceback. Simple, lightweight, controllable. Debug reasons of exceptions by logging or pretty printing colorful variable contexts for each frame in a stacktrace, showing every value. Dump locals environments after errors to console, files, and loggers. Works in Jupyter and IPython. Install with pip or conda.
Stars: ✭ 509 (+2213.64%)
Mutual labels:  error-handling, logging
Snoopy
Snoopy is a small library that logs all program executions on your Linux/BSD system (a.k.a. Snoopy Logger).
Stars: ✭ 835 (+3695.45%)
Mutual labels:  logging, logger
Logging Helpers
Basic template helpers for printing messages out to the console. Useful for debugging context in templates. Should work with any template engine.
Stars: ✭ 5 (-77.27%)
Mutual labels:  logging, error
Simplog
A simple logger. No dependencies, no special features, just logging.
Stars: ✭ 17 (-22.73%)
Mutual labels:  logging, logger
Monolog
Requirements
Stars: ✭ 19,361 (+87904.55%)
Mutual labels:  logger, logging
Cocoadebug
iOS Debugging Tool 🚀
Stars: ✭ 3,769 (+17031.82%)
Mutual labels:  logging, logger
Electron Timber
Pretty logger for Electron apps
Stars: ✭ 337 (+1431.82%)
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 (+2977.27%)
Mutual labels:  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 (+1400%)
Mutual labels:  logging, logger
Izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
Stars: ✭ 423 (+1822.73%)
Mutual labels:  logging, logger

Thoth

Thoth

What is Thoth?

In Egyptian Mythology, Thoth was the Egyptian ibis-headed god of knowledge, magic and wisdom.

In this Context

Thoth is an error logger for golang. It helps log errors to a log file so you can go back to find how why and when something breaks in production.

Installation

You can install Thoth by running:

go get github.com/ichtrojan/thoth

Usage

Thoth supports logging to two filetypes:

  • log
  • json

Step one - Initiate Thoth

Thoth Initiation for log

...
file, err := thoth.Init("log")

if err != nil {
    log.Fatal(err)
}
...

Thoth Initiation for json

...
json, err := thoth.Init("json")

if err != nil {
    log.Fatal(err)
}
...

Step two - Log errors

Regardless of the variable assigned to a Thoth Init function and log format; errors can be logged using the Log function.

Thoth Initiation for log

Logging errors from packages

...
if err != nil {
    file.Log(err)
}
...

Logging custom errors based on a given condition

...
isBroke := true

if isBroke {
    file.Log(errors.New("something went wrong"))
}
...

Thoth Initiation for json

Logging errors from packages

...
if err != nil {
    json.Log(err)
}
...

Logging custom errors based on a given condition

...
high := true

if high {
    json.Log(errors.New("highest in the room"))
}
...

Step three - Serve real-time logs dashboard

You can serve a dashboard to view your logs in realtime using the Serve function. Depending on the filetype specified in the Init function, it will serve the content of your log file.

Usage format

file.Serve({dashboard route}, {dashboard password})

Thoth serve for log

...
if err := file.Serve("/logs", "12345"); err != nil {
    log.Fatal(err)
}

if err := http.ListenAndServe(":8000", nil); err != nil {
    file.Log(err)
}
...

The snippet above will serve your realtime log dashboard on port 8000 and can be visited on /logs route.

You can also check the example directory to see a sample usage.

NOTE The realtime dashboard for json is currently on beta, it can be used but still looks experimental.

Contributors

Conclusion

Contributions are welcome to this project to further improve it to suit the general public need. I hope you enjoy the simplicity of Thoth and cannot wait to see the wonderful project you build with it.

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].