com.planet57.gossip:gossip-slf4j

Gossip is a SLF4j backend provider which has simple, flexible configuration and minimal byte-code footprint.

License

License

Categories

Categories

Net SLF4J Application Layer Libs Logging
GroupId

GroupId

com.planet57.gossip
ArtifactId

ArtifactId

gossip-slf4j
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

com.planet57.gossip:gossip-slf4j
Gossip is a SLF4j backend provider which has simple, flexible configuration and minimal byte-code footprint.

Download gossip-slf4j

How to add to project

<!-- https://jarcasting.com/artifacts/com.planet57.gossip/gossip-slf4j/ -->
<dependency>
    <groupId>com.planet57.gossip</groupId>
    <artifactId>gossip-slf4j</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.planet57.gossip/gossip-slf4j/
implementation 'com.planet57.gossip:gossip-slf4j:2.0.0'
// https://jarcasting.com/artifacts/com.planet57.gossip/gossip-slf4j/
implementation ("com.planet57.gossip:gossip-slf4j:2.0.0")
'com.planet57.gossip:gossip-slf4j:jar:2.0.0'
<dependency org="com.planet57.gossip" name="gossip-slf4j" rev="2.0.0">
  <artifact name="gossip-slf4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.planet57.gossip', module='gossip-slf4j', version='2.0.0')
)
libraryDependencies += "com.planet57.gossip" % "gossip-slf4j" % "2.0.0"
[com.planet57.gossip/gossip-slf4j "2.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.planet57.gossip : gossip-core jar 2.0.0
com.google.code.findbugs : jsr305 Optional jar 3.0.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Description

SLF4j Gossip Provider

Build Status DepShield Badge

Features

  • Small footprint ~75k (even smaller for gossip-bootstrap-slf4j ~20k)
  • Profile-based configuration
  • Profile activation triggers
  • Multiple source inputs
  • Console and rolling file listeners
  • ANSI color rendering
  • Internal logging
  • SLF4j support, helpers and utilities

Synopsis

Need a small fast logging provider for SLF4j? Don't want to pull in the kitchen sink with Log4j? Hate JUL?

If you answered yes to any (or all) of the questions above, then Gossip might be the logging provider for you!

If you don't mind some additional byte-code weight, then you should probably look at LOGBack. This is the recommended SLF4j provider when byte-code size is not an issue.

If you think that JUL is the best logging system ever, please exit the universe as soon as possible.

License

Apache 2.0

Optional Dependencies

  • jANSI - For ANSI colored output

Configuration

Configuration of Gossip is handled via standard property files.

The bootstrap configuration attempts to read:

  1. META-INF/com.planet57.gossip/config.properties (as resource)
  2. -Dgossip.configuration (value of as file/url)
  3. ~/.gossip/config.properties (as file)

Bootstrap or Internal Logging

Gossip provides some minimal SLF4j components to be used:

  • Before the proper logging was created
  • In environments where only the very basic control over logging is required

The gossip-bootstrap artifact contains, com.planet57.gossip.Log which is a SLF4j LoggerFactory-like class that produces real SLF4j Logger instances. This can be used in cases where the configuration/installation of SLF4j is not ready yet, and can be converted to use the desired SLF4j provider using Log.configure(ILoggerFactory). Gossip internal loggers are delegates, so once the "real" SLF4j provider is configured they will be updated to use the target logging systems Logger implementations.

For users that want to use standard SLF4j but need a little more control over the logging system than slf4j-simple provides, the gossip-bootstrap-slf4j module provides bindings to use the internal Log as a real SLF4j binding.

Log has a few parameters controlled by system properties:

  • com.planet57.gossip.Log.threshold = [TRACE|DEBUG|INFO|WARN|ERROR]
  • com.planet57.gossip.Log.internalThreshold = [TRACE|DEBUG|INFO|WARN|ERROR]
  • com.planet57.gossip.Log.stream = [OUT|ERR]
  • com.planet57.gossip.Log.pattern (see PatternRenderer for details)

In addition, these are configurable runtime via method calls.

Gossip uses this internal logging system when booting up to provide its gossip-slf4j bindings.

Extra Components

To avoid bloating out core with optional/extra components, gossip-extra is here to hold on to stuff which you might want, but which is not required by the core.

General Support and Helpers

In addition to providing SLF4j bindings, Gossip also contains some helpers classes for using SLF4j in general.

These can be found in gossip-support.

Building

Requirements

  • Maven 3+ (recommend using Maven wrapper scripts provided)
  • Java 5+

Check out and build:

git clone git://github.com/jdillon/gossip.git
cd gossip
./mvnw install

Versions

Version
2.0.0