Coder Social home page Coder Social logo

hderms / scribe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from outr/scribe

0.0 1.0 0.0 1.57 MB

Practical logging framework that doesn't require any other logging framework and can be completely configured programmatically.

License: MIT License

Scala 99.23% Shell 0.48% Java 0.29%

scribe's Introduction

scribe

Build Status Codacy Badge Stories in Ready Gitter Maven Central Latest version Javadocs

Scribe is a completely different way of thinking about logging. Instead of wrapping around existing logging frameworks and bearing their performance and design flaws, Scribe is built from the ground up to provide fast and effective logging in Scala, Scala.js, and Scala Native without the need of configuration files or additional dependencies. All management of logging can be handled programmatically (of course, classic logging configuration can be utilized as well if desired) in Scala itself, giving the developer the freedom to use whatever configuration framework, if any, they should choose to use.

Quick Start

For people that want to skip the explanations and see it action, this is the place to start!

Dependency Configuration

libraryDependencies += "com.outr" %%% "scribe" % "2.6.0"

Or, if you want interoperability with SLF4J (for those silly projects that haven't switched to Scribe yet):

libraryDependencies += "com.outr" %%% "scribe-slf4j" % "2.6.0"

Usage

scribe.info("Yes, it's that simple!")

Why Another Logging Framework?

Yes, we know there are too many Java logging frameworks to count, and a large number of decent logging frameworks in Scala, so why did we write yet another logging framework? Nearly every Scala logging framework is mostly just a wrapper around Java logging frameworks (usually SLF4J, Log4J, or Logback). This comes with a few problems:

  1. No support for Scala.js
  2. No support for Scala Native
  3. Performance cost (Blog Post: http://www.matthicks.com/2018/02/scribe-2-fastest-jvm-logger-in-world.html)
  4. Additional dependencies
  5. Substantial cost logging method and line numbers
  6. Lack of programmatic configuration support

A few of the main features that Scribe offers:

  1. Performance is a critical consideration. We leverage Macros to handle optimization of everything possible at compile-time to avoid logging slowing down your production application. As far as we are aware, Scribe is the fastest logging framework on the JVM.
  2. Programmatic configuration. No need to be bound to configuration files to configure your logging. This means you can rely on any configuration framework or you can configure real-time changes to your logging in your production environment. This particularly comes in handy if you need to enable debug logging on something going wrong in production. No need to restart your server, simply provide a mechanism to modify the logging configuration in real-time.
  3. Clean logging. Macros allow us to introduce logging into a class via an import instead of a mix-in or unnecessary setup code.
  4. Zero cost class, method, and line number logging built-in. Never worry about your logger working up the stack to figure out the position of the logging statement at runtime. With Macros we determine that information at compile-time to avoid any runtime cost.
  5. Asynchronous logging support. Scribe's logger is very fast, but if real-time performance is critical, the asynchronous logging support completely removes logging impact from your application's thread impact.

Documentation

Advanced Topics

Optional Modules

Community

The best way to receive immediate feedback for any questions is via our Gitter channel

Acknowledgements

YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.

scribe's People

Contributors

darkfrog26 avatar cornerman avatar tindzk avatar shawjef3 avatar lolgab avatar sungjk avatar asakaev avatar densh avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.