Git Product home page Git Product logo

fluent-logger-scala's Introduction

fluent-logger-scala Build Status Maven Central Scaladoc

Fluentd logger for Scala

Many web/mobile applications generate huge amount of event logs (c,f. login, logout, purchase, follow, etc). To analyze these event logs could be really valuable for improving the service. However, the challenge is collecting these logs easily and reliably.

Fluentd solves that problem by having: easy installation, small footprint, plugins, reliable buffering, log forwarding, etc.

fluent-logger-scala is a Scala library, to record the events from Scala application, based on fluent-logger-java. Main difference between scala and java version is to support Scala Collection.

Please see QuickStart to get started!

Usage

# For Scala 2.11 and 2.12 (Since fluent-logger-scala 0.7.0)
libraryDependencies += "org.fluentd" %% "fluent-logger-scala" % "(version)"

# For Scala 2.10 users (deprecated)
libraryDependencies += "org.fluentd" %% "fluent-logger-scala" % "0.6.0"

API

fluent-logger-scala API is based on fluent-logger-java:

FluentLoggerFactory#getLogger(tag: String): FluentLogger
FluentLoggerFactory#getLogger(tag: String, host: String, port: Int): FluentLogger
FluentLoggerFactory#getLogger(tag: String, host: String, port: Int, timeout: Int, bufferCapacity: Int): FluentLogger
FluentLoggerFactory#flushAll(): Unit
FluentLoggerFactory#closeAll(): Unit

FluentLogger#log(label: String, key: String, value: Any): Boolean
FluentLogger#log(label: String, key: String, value: Any, timestamp: Long): Boolean
FluentLogger#log(tag:String, mutableMap/immutableMap[String, Any]):Boolean
FluentLogger#flush()
FluentLogger#close()

For Developers

$ ./sbt
> compile
> test
# cross Scala version testing
> + test

Publishing to Maven Central

Describe your account information in $HOME/.sbt/(sbt-version)/sonatype.sbt file:

credentials += Credentials("Sonatype Nexus Repository Manager",
    "oss.sonatype.org",
    "(Sonatype user name)",
    "(Sonatype password)")

The release command will publish signed artifacts to the Sonatype repository, and perform releasing to Maven Central:

./sbt release

License and Copyright

  • Copyright © 2011- Tsuyoshi Ozawa and Taro L. Saito
  • Apache License, Version 2.0

Misc

This document is inspired by fluent-logger-python

fluent-logger-scala's People

Contributors

oza avatar xerial avatar zaneli avatar xuwei-k avatar cosmo0920 avatar repeatedly avatar homma-takamasa avatar anekos avatar choplin avatar futoase 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.