Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/selcuksert/log-benchmark
https://github.com/selcuksert/log-benchmark
Last synced: about 7 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/selcuksert/log-benchmark
- Owner: selcuksert
- License: mit
- Created: 2020-10-10T16:24:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-19T12:17:32.000Z (almost 3 years ago)
- Last Synced: 2023-03-09T05:41:33.333Z (over 1 year ago)
- Language: Java
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# log-benchmark
A benchmarking tool for Log4J [`JdbcAppender`](https://github.com/apache/logging-log4j2/blob/master/log4j-jdbc/src/main/java/org/apache/logging/log4j/jdbc/appender/JdbcAppender.java)## Program Parameters
Need to pass/have following VM parameters/system properties:
|Name|Default Value|Description|
|----|-------------|-----------|
|MYSQL_HOST|localhost|MySQL Server Host|
|MYSQL_HOST|3306|MySQL Server Port|
|MYSQL_DB_NAME|-|DB name that hosts the log table|
|MYSQL_DB_USER|-|Username of DB user that has the privilege to alter the log table|
|MYSQL_DB_PASS|-|DB password of the `MYSQL_DB_USER`|
|ASYNC_LOGGER_ENABLED|true|Flag to decided whether Log4J [Asynchronous Logger](https://logging.apache.org/log4j/2.x/manual/async.html) is to be used|
|NO_OF_THREADS|-|Number of threads that are tasked to send log events in parallel|
|MAX_ATTEMPTS|-|Maximum number of logging attempts for all of logger threads|## Log Database
MYSQL is used in this one and [HikariCP](https://github.com/brettwooldridge/HikariCP) JDBC connection pooling framework is utilized under the hood.### Log Table
Such a table need to be created:
```SQL
CREATE TABLE log(
thread VARCHAR(100),
entry_date TIMESTAMP,
logger VARCHAR(100),
log_level VARCHAR(100),
message TEXT,
exception TEXT
);
```