Giter Site home page Giter Site logo

fluent-logger-ruby's Introduction

Fluent logger

A structured event loger

Examples

Simple

require 'fluent-logger'

log = Fluent::Logger::FluentLogger.new(nil, :host=>'localhost', :port=>24224)
unless log.post("myapp.access", {"agent"=>"foo"})
  p log.last_error # You can get last error object via last_error method
end

# output: myapp.access {"agent":"foo"}

Singleton

require 'fluent-logger'

Fluent::Logger::FluentLogger.open(nil, :host=>'localhost', :port=>24224)
Fluent::Logger.post("myapp.access", {"agent"=>"foo"})

# output: myapp.access {"agent":"foo"}

Tag prefix

require 'fluent-logger'

log = Fluent::Logger::FluentLogger.new('myapp', :host=>'localhost', :port=>24224)
log.post("access", {"agent"=>"foo"})

# output: myapp.access {"agent":"foo"}

Loggers

Fluent

Fluent::Logger::FluentLogger.open('tag_prefix', :host=>'localhost', :port=24224)

Console

Fluent::Logger::ConsoleLogger.open(io)

Null

Fluent::Logger::NullLogger.open
name description
Web site http://fluent.github.com/
Documents http://fluent.github.com/doc/
Source repository https://github.com/fluent/fluent-logger-ruby
Author Sadayuki Furuhashi
Copyright (c) 2011 FURUHASHI Sadayuki
License Apache License, Version 2.0

fluent-logger-ruby's People

Contributors

eudoxa avatar frsyuki avatar hotchpotch avatar kou avatar kzk avatar repeatedly avatar sonots avatar tbrosman avatar

Watchers

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