Skip to content

Commit 3cad24b

Browse files
authored
fix: update the default settings and log4j2 configuration files (#384)
Signed-off-by: Nathan Klick <[email protected]>
1 parent cd65497 commit 3cad24b

File tree

2 files changed

+51
-35
lines changed

2 files changed

+51
-35
lines changed

resources/templates/log4j2.xml

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,61 +7,76 @@
77
</Console>
88

99
<RollingFile name="RollingFile" fileName="output/hgcaa.log"
10-
filePattern="output/hgcaa.log-%d{yyyy-MM-dd}-%i.log">
10+
filePattern="output/hgcaa-%i.log">
1111
<PatternLayout>
1212
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p %-4L %c{1} - %m{nolookups}%n</pattern>
1313
</PatternLayout>
1414
<Policies>
1515
<SizeBasedTriggeringPolicy size="100 MB"/>
1616
</Policies>
17-
<DefaultRolloverStrategy max="1000"/>
17+
<DefaultRolloverStrategy max="10"/>
1818
</RollingFile>
1919

2020
<RollingFile name="QueriesRollingFile" fileName="output/queries.log"
21-
filePattern="output/queries.log-%d{yyyy-MM-dd}-%i.log">
21+
filePattern="output/queries-%i.log">
2222
<BurstFilter level="INFO" rate="50" maxBurst="500"/>
2323
<PatternLayout>
2424
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p %-4L %c{1} - %m{nolookups}%n</pattern>
2525
</PatternLayout>
2626
<Policies>
2727
<SizeBasedTriggeringPolicy size="100 MB"/>
2828
</Policies>
29-
<DefaultRolloverStrategy max="1000"/>
29+
<DefaultRolloverStrategy max="10"/>
3030
</RollingFile>
3131

3232
<RollingFile name="fileLog" fileName="output/swirlds.log"
33-
filePattern="output/swirlds.log-%d{yyyy-MM-dd}-%i.log">
33+
filePattern="output/swirlds-sdk-%i.log">
34+
<PatternLayout>
35+
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-8sn %-5p %-16marker &lt;%t&gt; %c{1}: %msg{nolookups}%n</pattern>
36+
</PatternLayout>
37+
<Policies>
38+
<SizeBasedTriggeringPolicy size="100 MB"/>
39+
</Policies>
40+
<DefaultRolloverStrategy max="10"/>
41+
</RollingFile>
42+
43+
<RollingFile name="vMapLog" fileName="output/swirlds-vmap.log"
44+
filePattern="output/swirlds-vmap-%i.log">
3445
<PatternLayout>
3546
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-8sn %-5p %-16marker &lt;%t&gt; %c{1}: %msg{nolookups}%n</pattern>
3647
</PatternLayout>
3748
<Policies>
3849
<SizeBasedTriggeringPolicy size="100 MB"/>
3950
</Policies>
40-
<DefaultRolloverStrategy max="1000"/>
51+
<DefaultRolloverStrategy max="10"/>
4152
</RollingFile>
4253

4354
<!-- Platform hash stream logs -->
4455
<RollingFile name="swirldsHashStream" fileName="output/swirlds-hashstream/swirlds-hashstream.log"
45-
filePattern="output/swirlds-hashstream/swirlds-hashstream-%d{yyyy-MM-dd}-%i.log.gz">
56+
filePattern="output/swirlds-hashstream/swirlds-hashstream-%i.log">
4657
<PatternLayout>
4758
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-8sn %-5p %-16marker &lt;%t&gt; %c{1}: %msg{nolookups}%n</pattern>
4859
</PatternLayout>
4960
<Policies>
50-
<TimeBasedTriggeringPolicy/>
5161
<SizeBasedTriggeringPolicy size="100 MB"/>
5262
</Policies>
53-
<DefaultRolloverStrategy max="10">
54-
<Delete basePath="output" maxDepth="3">
55-
<IfFileName glob="swirlds-hashstream/swirlds-hashstream-*.log.gz">
56-
<IfLastModified age="P3D"/>
57-
</IfFileName>
58-
</Delete>
59-
</DefaultRolloverStrategy>
63+
<DefaultRolloverStrategy max="10"/>
6064
</RollingFile>
6165

6266
<!-- Transaction state logs -->
63-
<RollingFile name="TransactionStateLogs" fileName="output/transaction-state/state-changes.log"
64-
filePattern="output/transaction-state/state-changes-%d{yyyy-MM-dd}-%i.log.gz">
67+
<RollingFile name="TransactionStateLogs"
68+
fileName="output/transaction-state/state-changes.log"
69+
filePattern="output/transaction-state/state-changes-%i.log">
70+
<PatternLayout>
71+
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} - %m{nolookups}%n</pattern>
72+
</PatternLayout>
73+
<SizeBasedTriggeringPolicy size="50 MB" />
74+
<DefaultRolloverStrategy max="10"/>
75+
</RollingFile>
76+
77+
<RollingFile name="StateLogs"
78+
fileName="output/state/state-changes.log"
79+
filePattern="output/state/state-changes-%i.log">
6580
<PatternLayout>
6681
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} - %m{nolookups}%n</pattern>
6782
</PatternLayout>
@@ -76,7 +91,7 @@
7691
<AppenderRef ref="fileLog"/>
7792
</Root>
7893

79-
<Logger name="com.swirlds" level="DEBUG" additivity="false">
94+
<Logger name="com.swirlds" level="INFO" additivity="false">
8095
<AppenderRef ref="fileLog">
8196
<Filters>
8297
<!-- MerkleDb & Virtual Merkle -->
@@ -161,7 +176,6 @@
161176
<MarkerFilter marker="ADV_CRYPTO_SYSTEM" onMatch="DENY" onMismatch="NEUTRAL"/>
162177

163178
<!-- Startup/Restart/Reconnect -->
164-
<MarkerFilter marker="CONFIG" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
165179
<MarkerFilter marker="STARTUP" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
166180
<MarkerFilter marker="PLATFORM_STATUS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
167181
<MarkerFilter marker="RECONNECT" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
@@ -203,6 +217,12 @@
203217
<AppenderRef ref="TransactionStateLogs"/>
204218
</Logger>
205219

220+
<!-- Send state logs to their own appender -->
221+
<Logger name="com.swirlds.platform.state.merkle.logging.StateLogger" level="info" additivity="false">
222+
<AppenderRef ref="StateLogs"/>
223+
</Logger>
224+
225+
206226
<Logger name="com.hedera" level="info" additivity="false">
207227
<AppenderRef ref="Console"/>
208228
<AppenderRef ref="RollingFile"/>
@@ -211,7 +231,7 @@
211231
<AppenderRef ref="Console"/>
212232
<AppenderRef ref="RollingFile"/>
213233
</Logger>
214-
<Logger name="com.hedera.services.queries.answering" level="debug" additivity="false">
234+
<Logger name="com.hedera.services.queries.answering" level="warn" additivity="false">
215235
<AppenderRef ref="QueriesRollingFile"/>
216236
</Logger>
217237

@@ -354,4 +374,4 @@
354374
<AppenderRef ref="RollingFile"/>
355375
</Logger>
356376
</Loggers>
357-
</Configuration>
377+
</Configuration>

resources/templates/settings.txt

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
checkSignedStateFromDisk, 1
2-
csvFileName, MainNetStats
3-
doUpnp, false
4-
loadKeysFromPfxFiles, 0
5-
maxOutgoingSyncs, 1
6-
reconnect.active, 1
7-
reconnect.reconnectWindowSeconds, -1
8-
showInternalStats, 1
9-
state.saveStatePeriod, 300
10-
useLoopbackIp, false
11-
waitAtStartup, false
1+
#############################
2+
# State #
3+
#############################
4+
125
state.mainClassNameOverride, com.hedera.services.ServicesMain
13-
maxEventQueueForCons, 1000
14-
merkleDb.hashesRamToDiskThreshold, 8388608
15-
event.creation.maxCreationRate, 20
6+
7+
#############################
8+
# Crypto #
9+
#############################
10+
11+
crypto.enableNewKeyStoreModel, true

0 commit comments

Comments
 (0)