You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* updating latest release version
* adding support for in memory buffer, changing tests to run once for in memory buffer and once for on disk buffer
* adding check for buffer threshold size
* make start function shorter
* deleting abstract test + adding parameterized
* naming buffer -> queueu, update readme
* use new java sender(1.0.16)
* change in printing messages
* adding description to deprecated and taking some error prints out to higher level function
* fix travis
* refactoring tests + adding more tests for in-memory
* change naming in some tests
* adding log count limit + test
* shade guava
* add validation for log count
* update readme
* change term limit to capacity + fix tests naming
Copy file name to clipboardExpand all lines: README.md
+24-7
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Log4j 2 Appender that ships logs using HTTPS bulk
6
6
This appender sends logs to your [Logz.io](http://logz.io) account, using non-blocking threading, bulks, and HTTPS encryption. Please note that this appender requires log4j version 2.7 and up, and java 8 and up.
7
7
8
8
### Technical Information
9
-
This appender uses [LogzioSender](https://github.com/logzio/logzio-java-sender) implementation. Once you send a log, it will be enqueued in the buffer and 100% non-blocking. There is a background task that will handle the log shipment for you. This jar is an "Uber-Jar" that shades both LogzioSender, BigQueue, Gson and Guava to avoid "dependency hell".
9
+
This appender uses [LogzioSender](https://github.com/logzio/logzio-java-sender) implementation. Once you send a log, it will be enqueued in the queue and 100% non-blocking. There is a background task that will handle the log shipment for you. This jar is an "Uber-Jar" that shades both LogzioSender, BigQueue, Gson and Guava to avoid "dependency hell".
10
10
11
11
### Installation from maven
12
12
```xml
@@ -40,16 +40,31 @@ This appender uses [LogzioSender](https://github.com/logzio/logzio-java-sender)
40
40
|**logzioToken**|*None*| Your Logz.io token, which can be found under "settings" in your account, If the value begins with `$` then the appender looks for an environment variable or system property with the name specified. For example: `$LOGZIO_TOKEN` will look for environment variable named `LOGZIO_TOKEN`|
41
41
|**logzioType**|*java*| The [log type](https://support.logz.io/hc/en-us/articles/209486049-What-is-Type-) for that appender, it must not contain any spaces |
42
42
|**logzioUrl**|*https://listener.logz.io:8071*| The url that the appender sends to. If your account is in the EU you must use https://listener-eu.logz.io:8071|
43
-
|**drainTimeoutSec**|*5*| How often the appender should drain the buffer (in seconds) |
44
-
|**fileSystemFullPercentThreshold**|*98*| The percent of used file system space at which the appender will stop buffering. When we will reach that percentage, the file system in which the buffer is stored will drop all new logs until the percentage of used space drops below that threshold. Set to -1 to never stop processing new logs |
45
-
|**bufferDir**|*System.getProperty("java.io.tmpdir")*| Where the appender should store the buffer |
43
+
|**drainTimeoutSec**|*5*| How often the appender should drain the queue (in seconds) |
46
44
|**socketTimeoutMs**|*10 * 1000*| The socket timeout during log shipment |
47
45
|**connectTimeoutMs**|*10 * 1000*| The connection timeout during log shipment |
48
46
|**addHostname**|*false*| Optional. If true, then a field named 'hostname' will be added holding the host name of the machine. If from some reason there's no defined hostname, this field won't be added |
49
47
|**additionalFields**|*None*| Optional. Allows to add additional fields to the JSON message sent. The format is "fieldName1=fieldValue1;fieldName2=fieldValue2". You can optionally inject an environment variable value using the following format: "fieldName1=fieldValue1;fieldName2=$ENV_VAR_NAME". In that case, the environment variable should be the only value. In case the environment variable can't be resolved, the field will be omitted. |
50
48
|**debug**|*false*| Print some debug messages to stdout to help to diagnose issues |
51
49
|**compressRequests**|*false*| Boolean. `true` if logs are compressed in gzip format before sending. `false` if logs are sent uncompressed. |
|**inMemoryQueueCapacityBytes**|*1024 * 1024 * 100*| The amount of memory(bytes) we are allowed to use for the memory queue. If the value is -1 the sender will not limit the queue size.|
55
+
|**inMemoryLogsCountCapacity**|*-1*| Number of logs we are allowed to have in the queue before dropping logs. If the value is -1 the sender will not limit the number of logs allowed.|
56
+
|**inMemoryQueue**|*false*| Set to true if the appender uses in memory queue. By default the appender uses disk queue|
|**fileSystemFullPercentThreshold**|*98*| The percent of used file system space at which the sender will stop queueing. When we will reach that percentage, the file system in which the queue is stored will drop all new logs until the percentage of used space drops below that threshold. Set to -1 to never stop processing new logs |
63
+
|**gcPersistedQueueFilesIntervalSeconds**|*30*| How often the disk queue should clean sent logs from disk |
64
+
|**bufferDir**(deprecated, use queueDir) |*System.getProperty("java.io.tmpdir")*| Where the appender should store the queue |
65
+
|**queueDir**|*System.getProperty("java.io.tmpdir")*| Where the appender should store the queue |
66
+
67
+
53
68
54
69
### Code Example
55
70
```java
@@ -78,7 +93,7 @@ public class LogzioLog4j2Example {
0 commit comments