Skip to content

epam/gflog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Garbage Free Log

GitHub Maven Central

Continuous Integration CodeQL

Highly efficient garbage-free logging framework for Java 8 and above.

  • Fully tested on Java 8 through Java 21
  • Optimized formatting support for:
    • Epoch timestamps (milliseconds, nanoseconds)
    • Alphanumeric values
    • DFP decimal floating-point numbers
  • Asynchronous logging with configurable throttling and retention policies
  • Native support for streaming logs to Graylog using the GELF format

Use

Add the following dependencies to your project:

implementation 'com.epam.deltix:gflog-api:3.0.6'
runtimeOnly    'com.epam.deltix:gflog-core:3.0.6'

Use the following sample to log a message:

Log log = LogFactory.getLog("my-logger");
...
log.info()
   .append("Hello ")
   .append(name)
   .append("! Current time is ")
   .appendTimestamp(System.currentTimeMillis())
   .commit();

Or:

Log log = LogFactory.getLog("my-logger");
..
log.info("Hello %s! Current time is %s")
   .with(name)
   .withTimestamp(System.currentTimeMillis());

Reference

  • Bridges - how to configure bridges for the existing logging frameworks.
  • Configuration - how to configure gflog.
  • XML Config - how to configure gflog with a xml config.
  • Performance - what gflog's performance.

Build

Build the project with Gradle and Java 8:

./gradlew build

Acknowledgment

This project was inspired by gflogger library by Vladimir Dolzhenko. It originally started as a fork but further enhancements and new API made it into a separate project.

License

Copyright (C) 2023 EPAM

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Highly efficient garbage-free logging framework for Java 8+

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages