Skip to content

nikolaybespalov/jul4nt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jul4nt

Java Logging Handler which publishes log records to Windows Event Log

Windows Event Viewer

Maven Central AppVeyor Codacy Codacy Badge

How to use?

The library is available on Maven central. You can start to use the library by adding it to dependencies section of pom.xml:

  <dependencies>
    <!-- ... -->
    <dependency>
      <groupId>com.github.nikolaybespalov</groupId>
      <artifactId>jul4nt</artifactId>
      <version>${jul4nt.version}</version>
      <scope>runtime</scope>
    </dependency>
    <!-- ... -->
  </dependencies>

Or use it in build.gradle:

  dependencies {
    // ...
    runtime("com.github.nikolaybespalov:jul4nt:{jul4nt.version}")
    // ...
  }

Now you can use the logging configuration file with the following options:

# 
handlers = com.github.nikolaybespalov.jul4nt.EventLogHandler

# Specifies the default level for the Handler (defaults to Level.INFO)
com.github.nikolaybespalov.jul4nt.EventLogHandler.level = Level.SEVERE

# Specifies the name of a Filter class to use (defaults to no Filter)
com.github.nikolaybespalov.jul4nt.EventLogHandler.filter = 

# Specifies the name of a Formatter class to use (defaults to internal implementation)
com.github.nikolaybespalov.jul4nt.EventLogHandler.formatter = java.util.logging.SimpleFormatter

# The name of the character set encoding to use (defaults to the default platform encoding)
com.github.nikolaybespalov.jul4nt.EventLogHandler.encoding = UTF-8

# The name of the Source Name to use (defaults to EventLogHandler)
com.github.nikolaybespalov.jul4nt.EventLogHandler.sourceName = My Application

# Allows automatically create the required registry key (defaults to true)
com.github.nikolaybespalov.jul4nt.EventLogHandler.autoCreateRegKey = true

# Allows automatically delete the required registry key (defaults to false)
com.github.nikolaybespalov.jul4nt.EventLogHandler.autoDeleteRegKey = false

Or use the above-described configuration properties as system properties. For example:

-Dcom.github.nikolaybespalov.jul4nt.EventLogHandler.sourceName="My Application"

Example

An example of using the jul4nt

About

Java Logging Handler which publishes log records to Windows Event Log

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages