https://github.com/andbin/logback-property-definer-demo
A simple demo project that shows the implementation of property definers with the logback logging library
https://github.com/andbin/logback-property-definer-demo
apache-maven demo-application java java-11 logback
Last synced: 3 months ago
JSON representation
A simple demo project that shows the implementation of property definers with the logback logging library
- Host: GitHub
- URL: https://github.com/andbin/logback-property-definer-demo
- Owner: andbin
- License: mit
- Created: 2023-01-06T15:30:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T15:30:48.000Z (over 3 years ago)
- Last Synced: 2025-12-27T17:32:50.187Z (5 months ago)
- Topics: apache-maven, demo-application, java, java-11, logback
- Language: Java
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README



# Logback property definer demo
This is a simple demo project that shows the implementation of *property definers* with the **[logback](https://logback.qos.ch)** logging library. The main purpose of this project is the definition of a custom dynamic property named `vmId` that contains the identifier of the running JVM instance. This property is then configured in the `logback.xml` configuration file and logged on all log records.
This tecnique has been described in my blog article **[Implementation of property definers with logback](https://andbin.dev/java/logback-property-definers)**.
See the project files:
* [VmIdPropertyDefiner.java](src/main/java/dev/andbin/logbackdemo/VmIdPropertyDefiner.java), the class that implements the `PropertyDefiner` interface provided by logback
* [logback.xml](src/main/resources/logback.xml), the logback configuration file
* [Main.java](src/main/java/dev/andbin/logbackdemo/Main.java), the “main” class that can be used to verify the logging output
## License
This project is released under the **MIT License**, a very *permissive* free software license.
See the full text of the license: **[LICENSE.txt](LICENSE.txt)**