Help us shape the future of Go! Take the 2026 Go Developer Survey

fluent

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2013 License: Apache-2.0 Imports: 0 Imported by: 0

README

fluent-logger-golang

Build Status

A structured event logger for Fluentd (Golang)

How to install

go get github.com/t-k/fluent-logger-golang/fluent

Usage

Install the package with go get and use import to include it in your project.

import "github.com/t-k/fluent-logger-golang/fluent"

GoDoc: http://godoc.org/github.com/t-k/fluent-logger-golang/fluent

##Example

package main

import (
  "github.com/t-k/fluent-logger-golang/fluent"
  "fmt"
)

func main() {
  logger, err := fluent.New(fluent.Config{})
  if err != nil {
    fmt.Println(err)
  }
  defer logger.Close()
  tag := "myapp.access"
  var data = map[string]string{
    "foo":  "bar",
    "hoge": "hoge"}
  logger.Post(tag, data)
}

Setting config values

f := fluent.New(fluent.Config{FluentPort: 80, FluentHost: "example.com"})

Tests

go test

Documentation

Index

Constants

View Source
const Version = "0.2.0"

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL