• Stars
    star
    502
  • Rank 85,775 (Top 2 %)
  • Language
    Scala
  • License
    MIT License
  • Created over 8 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The fastest logging library in the world. Built from scratch in Scala and programmatically configurable.

scribe

CI Codacy Grade Codacy Coverage 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.

Availability

Scribe is available on the JVM, Scala.js, and ScalaNative with cross-compiling for Scala 2.12, 2.13, and 3

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" % "3.13.3"

For Cross-Platform projects (JVM, JS, and/or Native):

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

Or, if you want interoperability with SLF4J (to allow better interoperability with existing libraries using other loggers):

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

Usage

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

SBT Tip

Using the default logger in Scribe supports auto-line wrapping, but in SBT, the [info] prefixes cause that to get messed up. It's recommended to set:

outputStrategy := Some(StdoutOutput)

This will disable the [info] and [error] prefixes so logging looks correct when running your application within SBT.

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: https://matthicks.com/2018/02/06/scribe-2-0-fastest-jvm-logger-in-the-world/)
  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 (for a complete list):

  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

Check out the wiki for complete documentation

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.

More Repositories

1

youi

Next generation user interface and application development in Scala and Scala.js for web, mobile, and desktop.
Scala
209
star
2

reactify

The first and only true Functional Reactive Programming framework for Scala.
Scala
84
star
3

scarango

ArangoDB client written in Scala
Scala
59
star
4

scalarelational

Type-Safe framework for defining, modifying, and querying SQL databases
Scala
58
star
5

lucene4s

Light-weight convenience wrapper around Lucene to simplify complex tasks and add Scala sugar.
Scala
54
star
6

media4s

Scala command-line wrapper around ffmpeg, ffprobe, ImageMagick, and other tools relating to media.
Scala
33
star
7

perfolation

Performance focused interpolation
Scala
28
star
8

profig

Powerful configuration management for Scala (JSON, properties, command-line arguments, and environment variables)
Scala
28
star
9

sgine

Scala Engine for OpenGL-based Desktop, Android, and iOS game and business development.
Scala
22
star
10

mailgun4s

Mailgun API implementation in Scala
Scala
17
star
11

neo4akka

Neo4j Scala client using Akka-Http
Scala
15
star
12

powerscala

Powerful framework providing many useful utilities and features on top of the Scala language.
Scala
15
star
13

scala-stripe

Complete Browser and Server client integration of Stripe in Scala and Scala.js
Scala
12
star
14

spice

Powerful client / server technology for Scala
Scala
8
star
15

jefe

Manages installation, updating, downloading, launching, error reporting, and more for your application.
Scala
8
star
16

googleapi.scala.js

Wrapper around Google APIs
Scala
6
star
17

scalajs-pixijs

Scala.js facade for Pixi.js
JavaScript
6
star
18

giant-scala

Advanced functionality for working with MongoDB in Scala
Scala
6
star
19

scalapass

Useful tools for managing storage and validation of passwords in Scala applications
Scala
5
star
20

pdf4s

Simplified wrapper to create PDFs in Scala
Scala
5
star
21

outrgl

DEPRECATED: Please use http://youi.io going forward
Scala
5
star
22

nextui

UI Abstraction Framework
Scala
4
star
23

youi-designer

User interface designer tool to create, edit, import, export, and generate user interfaces for youi.
Scala
4
star
24

pmc

Project Management in Code - An incredibly straight-forward project management and build tool for Scala.
Scala
4
star
25

youi-template

Infrastructure for working with existing HTML files.
Scala
4
star
26

uberzip

Very fast multi-threaded unzipping utility.
Scala
3
star
27

youi-example

Example application built on YouI
Scala
3
star
28

robobrowser

Headless Browser wrapper library providing lots of features for API-access
Scala
3
star
29

hyperscala

DEPRECATED - See https://github.com/outr/youi for something far better.
Scala
3
star
30

lightdb

Prototype database concept using Lucene and HaloDB
Scala
3
star
31

youi-plugin

SBT plugin for use with YouI projects
Scala
3
star
32

outrbackup

Multi-threaded backup system.
Scala
2
star
33

iconsole

Web-based terminal / console with modular integration and distributed connectivity
Scala
2
star
34

async

Scala and Scala.js framework to execute and schedule asynchronous tasks
Scala
2
star
35

batcher

Command-line tool to batch operations, pause, save, and control concurrency
Scala
2
star
36

jsdoc2scalajs

Automated conversion of JSDocs to Scala.js facades.
Scala
1
star
37

smartystreets-scala-sdk

Scala SDK for SmartyStreets (https://smartystreets.com)
Scala
1
star
38

webmidi.scala.js

Scala.js facade for Web MIDI API and https://github.com/cwilso/WebMIDIAPIShim
Scala
1
star
39

scalarelational-manual

Source for generating the ScalaRelational manual
Scala
1
star
40

sgine-desktop.g8

Desktop-only template for Sgine
Scala
1
star
41

jar-heaven

The final solution to JAR Hell
Scala
1
star
42

torrent

Prototype for bittorrent management in Scala
Scala
1
star
43

scalajs-fabricjs

Facade around Fabric.js for Scala.js
Scala
1
star
44

geoscala

Locational data index that is full-text searchable and can update itself. Complete geospatial sorting and filtering support.
Scala
1
star