logfmt

Java implementation of logfmt (http://godoc.org/github.com/kr/logfmt)

License

License

MIT
Categories

Categories

Heroku Container PaaS Providers
GroupId

GroupId

com.heroku
ArtifactId

ArtifactId

logfmt
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

logfmt
Java implementation of logfmt (http://godoc.org/github.com/kr/logfmt)
Project URL

Project URL

https://github.com/naaman/logfmt-java
Source Code Management

Source Code Management

https://github.com/naaman/logfmt-java

Download logfmt

How to add to project

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

Dependencies

test (2)

Group / Artifact Type Version
org.testng : testng jar 6.8.1
com.google.caliper : caliper jar 0.5-rc1

Project Modules

There are no modules declared in this project.

logfmt-java

A Java implementation of logfmt, a Heroku logging format.

Usage

<dependency>
  <groupId>com.heroku</groupId>
  <artifactId>logfmt</artifactId>
  <version>0.1</version>
</dependency>
import com.heroku.logfmt.Logfmt;
...
Map<String, Object> parsed = Logfmt.parse("a=b thing=\"quoted thing\" justhename".toCharArray())
System.out.println(parsed.get("a"));

Build

mvn clean install

Benchmark

There's a crappy benchmark that can be run after building:

java -cp target/logfmt-0.2-SNAPSHOT.jar:target/test-classes/ com.heroku.logfmt.DumbBenchmark 1 "a=foo b=10ms c=cat E=\"123\" d foo= emp="

TODO

  • Reflection-based mapping

LICENSE

The MIT License (MIT)

Copyright (C) 2014 Naaman Newbold.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Versions

Version
0.1