mirror of
https://github.com/tiennm99/tjahzi.git
synced 2026-10-14 04:16:39 +00:00
Re #77: Improved property naming (logShipperIntervalMillis -> logShipperWakeupIntervalMillis) and implemented missing Logback part.
This commit is contained in:
1 parent
7ae613aae1
commit
bca115eef9
4 files changed
+18
-8
No files matched your search
@@ -23,7 +23,7 @@ public class TjahziInitializer {
|
||||
long batchSizeBytes,
|
||||
long batchWaitMillis,
|
||||
int bufferSizeBytes,
|
||||
long logShipperIntervalMillis,
|
||||
long logShipperWakeupIntervalMillis,
|
||||
long shutdownTimeoutMillis,
|
||||
boolean offHeap
|
||||
) {
|
||||
@@ -54,7 +54,7 @@ public class TjahziInitializer {
|
||||
);
|
||||
|
||||
AgentRunner runner = new AgentRunner(
|
||||
new SleepingMillisIdleStrategy(logShipperIntervalMillis),
|
||||
new SleepingMillisIdleStrategy(logShipperWakeupIntervalMillis),
|
||||
monitoringModule::addAgentError,
|
||||
null,
|
||||
agent
|
||||
|
||||
@@ -75,7 +75,7 @@ public class LokiAppenderBuilder<B extends LokiAppenderBuilder<B>> extends Abstr
|
||||
private long batchWait = 5;
|
||||
|
||||
@PluginBuilderAttribute
|
||||
private long logShipperIntervalMillis = 250;
|
||||
private long logShipperWakeupIntervalMillis = 250;
|
||||
|
||||
@PluginBuilderAttribute
|
||||
private int shutdownTimeoutSeconds = 10;
|
||||
@@ -145,7 +145,7 @@ public class LokiAppenderBuilder<B extends LokiAppenderBuilder<B>> extends Abstr
|
||||
TimeUnit.SECONDS.toMillis(batchWait),
|
||||
bufferSizeBytes,
|
||||
TimeUnit.SECONDS.toMillis(shutdownTimeoutSeconds),
|
||||
logShipperIntervalMillis,
|
||||
logShipperWakeupIntervalMillis,
|
||||
isUseOffHeapBuffer()
|
||||
);
|
||||
|
||||
@@ -251,12 +251,12 @@ public class LokiAppenderBuilder<B extends LokiAppenderBuilder<B>> extends Abstr
|
||||
this.batchWait = batchWait;
|
||||
}
|
||||
|
||||
public long getLogShipperIntervalMillis() {
|
||||
return logShipperIntervalMillis;
|
||||
public long getLogShipperWakeupIntervalMillis() {
|
||||
return logShipperWakeupIntervalMillis;
|
||||
}
|
||||
|
||||
public void setLogShipperIntervalMillis(long logShipperIntervalMillis) {
|
||||
this.logShipperIntervalMillis = logShipperIntervalMillis;
|
||||
public void setLogShipperWakeupIntervalMillis(long logShipperWakeupIntervalMillis) {
|
||||
this.logShipperWakeupIntervalMillis = logShipperWakeupIntervalMillis;
|
||||
}
|
||||
|
||||
public int getShutdownTimeoutSeconds() {
|
||||
|
||||
+9
@@ -26,6 +26,7 @@ public abstract class LokiAppenderConfigurator extends UnsynchronizedAppenderBas
|
||||
private long batchSize = 10_2400;
|
||||
private long batchWait = 5;
|
||||
private long shutdownTimeoutSeconds = 10;
|
||||
private long logShipperWakeupIntervalMillis = 250;
|
||||
|
||||
private int maxRequestsInFlight = 100;
|
||||
|
||||
@@ -120,6 +121,14 @@ public abstract class LokiAppenderConfigurator extends UnsynchronizedAppenderBas
|
||||
this.shutdownTimeoutSeconds = shutdownTimeoutSeconds;
|
||||
}
|
||||
|
||||
public long getLogShipperWakeupIntervalMillis() {
|
||||
return logShipperWakeupIntervalMillis;
|
||||
}
|
||||
|
||||
public void setLogShipperWakeupIntervalMillis(long logShipperWakeupIntervalMillis) {
|
||||
this.logShipperWakeupIntervalMillis = logShipperWakeupIntervalMillis;
|
||||
}
|
||||
|
||||
public int getMaxRequestsInFlight() {
|
||||
return maxRequestsInFlight;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ public class LokiAppenderFactory {
|
||||
TimeUnit.SECONDS.toMillis(configurator.getBatchWait()),
|
||||
bufferSizeBytes,
|
||||
TimeUnit.SECONDS.toMillis(configurator.getShutdownTimeoutSeconds()),
|
||||
configurator.getLogShipperWakeupIntervalMillis(),
|
||||
configurator.isUseOffHeapBuffer()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user