https://github.com/nikolaybespalov/jul4nt
Java Logging Handler which publishes log records to Windows Event Log
https://github.com/nikolaybespalov/jul4nt
java logging windows
Last synced: 6 months ago
JSON representation
Java Logging Handler which publishes log records to Windows Event Log
- Host: GitHub
- URL: https://github.com/nikolaybespalov/jul4nt
- Owner: nikolaybespalov
- License: apache-2.0
- Created: 2017-09-24T06:50:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-28T03:04:38.000Z (about 8 years ago)
- Last Synced: 2025-07-03T18:59:33.491Z (12 months ago)
- Topics: java, logging, windows
- Language: Java
- Homepage:
- Size: 82 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jul4nt
[Java Logging] [Handler] which publishes log records to [Windows Event Log]

[](https://maven-badges.herokuapp.com/maven-central/com.github.nikolaybespalov/jul4nt)
[](https://ci.appveyor.com/project/nikolaybespalov/jul4nt)
[](https://www.codacy.com/app/nikolaybespalov/jul4nt)
[](https://www.codacy.com/app/nikolaybespalov/jul4nt)
## 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`:
```xml
com.github.nikolaybespalov
jul4nt
${jul4nt.version}
runtime
```
Or use it in `build.gradle`:
```java
dependencies {
// ...
runtime("com.github.nikolaybespalov:jul4nt:{jul4nt.version}")
// ...
}
```
Now you can use the logging configuration file with the following options:
```properties
#
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:
```properties
-Dcom.github.nikolaybespalov.jul4nt.EventLogHandler.sourceName="My Application"
```
## Example
An [example](https://github.com/nikolaybespalov/jul4nt-example) of using the jul4nt
[Java Logging]: https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html "Java Logging"
[Handler]: https://docs.oracle.com/javase/8/docs/api/java/util/logging/Handler.html "Handler"
[Windows Event Log]: https://msdn.microsoft.com/ru-ru/library/windows/desktop/aa385780(v=vs.85).aspx "Windows Event Log"