Skip to content

Commit

Permalink
Don't use DarkGray (#5849)
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams committed Jun 21, 2023
1 parent 3d1510f commit 097e0f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void UpdateStats(Block? block, IBlockTree blockTreeCtx, int recoveryQueue
const string redText = "\u001b[38;5;196m";
const string greenText = "\u001b[92m";
const string darkGreenText = "\u001b[32m";
const string darkGreyText = "\u001b[90m";
const string darkGreyText = resetColor; // "\u001b[90m";

if (block is null)
{
Expand Down Expand Up @@ -176,7 +176,7 @@ public void UpdateStats(Block? block, IBlockTree blockTreeCtx, int recoveryQueue
> 75 => whiteText,
_ => ""
};
_logger.Info($"- Block{(chunkBlocks > 1 ? "s" : " ")}{(chunkBlocks == 1 ? mgasColor : "")} {chunkMGas,7:F2}{resetColor} MGas | {chunkTx,6:N0} txs | calls {callsColor}{chunkCalls,6:N0}{darkGreyText} {darkGreyText}({chunkEmptyCalls,3:N0}){resetColor} | sload {chunkSload,7:N0} | sstore {sstoreColor}{chunkSstore,6:N0}{resetColor} | create {createsColor}{chunkCreates,3:N0}{resetColor}{(currentSelfDestructs - _lastSelfDestructs > 0 ? $"{darkGreyText}({-(currentSelfDestructs - _lastSelfDestructs),3:N0}){resetColor}" : "")}");
_logger.Info($"- Block{(chunkBlocks > 1 ? "s" : " ")}{(chunkBlocks == 1 ? mgasColor : "")} {chunkMGas,7:F2}{resetColor} MGas | {chunkTx,6:N0} txs | calls {callsColor}{chunkCalls,6:N0}{resetColor} {darkGreyText}({chunkEmptyCalls,3:N0}){resetColor} | sload {chunkSload,7:N0} | sstore {sstoreColor}{chunkSstore,6:N0}{resetColor} | create {createsColor}{chunkCreates,3:N0}{resetColor}{(currentSelfDestructs - _lastSelfDestructs > 0 ? $"{darkGreyText}({-(currentSelfDestructs - _lastSelfDestructs),3:N0}){resetColor}" : "")}");
_logger.Info($"- Block throughput {mgasPerSecond,7:F2} MGas/s | {txps,9:F2} t/s | {bps,7:F2} b/s | recv {recoveryQueueSize,7:N0} | proc {blockQueueSize,6:N0}");
// Only output the total throughput in debug mode
if (_logger.IsDebug)
Expand Down
22 changes: 11 additions & 11 deletions src/Nethermind/Nethermind.Runner/NLog.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
<highlight-row backgroundColor="NoChange" condition="level == LogLevel.Fatal" foregroundColor="Red" />
<highlight-row backgroundColor="NoChange" condition="level == LogLevel.Error" foregroundColor="Red" />
<highlight-row backgroundColor="NoChange" condition="level == LogLevel.Warn" foregroundColor="Yellow" />
<highlight-row backgroundColor="NoChange" condition="level == LogLevel.Info" foregroundColor="Gray" />
<highlight-row backgroundColor="NoChange" condition="level == LogLevel.Info" foregroundColor="White" />
<highlight-row backgroundColor="NoChange" condition="level == LogLevel.Debug" foregroundColor="Gray" />
<highlight-row backgroundColor="NoChange" condition="level == LogLevel.Trace" foregroundColor="Magenta" />
<!-- Log Date Time -->
<highlight-word regex="^[0-9]{2} [a-zA-Z]{3} [0-9]{2}\:[0-9]{2}\:[0-9]{2}"
foregroundColor="DarkGray" wholeWords="true" />
foregroundColor="Gray" wholeWords="true" />
<!-- Urls -->
<highlight-word regex="https?://[^ \t\r\n]*" foregroundColor="DarkBlue" wholeWords="true" />
<!-- Shutdown -->
<highlight-word regex="(Disposing|Stopping|SyncDispatcher`1) .*" foregroundColor="DarkGray" wholeWords="true" />
<highlight-word regex="(Disposing|Stopping|SyncDispatcher`1) .*" foregroundColor="Gray" wholeWords="true" />
<!-- Important events at start of line -->
<highlight-word regex="(?&lt;=\| )(Received ForkChoice)" foregroundColor="DarkGreen" wholeWords="true" />
<highlight-word regex="(?&lt;=\| )(Valid|Synced chain Head)" foregroundColor="Green" wholeWords="true" />
Expand All @@ -60,23 +60,23 @@
<!-- Percentage progress -->
<highlight-word regex="[0-9]{1,3}\.[0-9]{2} \%|[0-9]{1,3} \%" foregroundColor="DarkYellow" />
<!-- Denominator of nnn / NNN (de-emphasize) -->
<highlight-word regex=" / [0-9,]+ " foregroundColor="DarkGray" />
<highlight-word regex=" / [0-9,]+ " foregroundColor="Gray" />
<!-- Short hash: 0x000...000 (de-emphasize) -->
<highlight-word regex="0x[0-9a-fA-F]*\.{3}[0-9a-fA-F]*" foregroundColor="DarkGray" wholeWords="true" />
<highlight-word regex="0x[0-9a-fA-F]*\.{3}[0-9a-fA-F]*" foregroundColor="Gray" wholeWords="true" />
<!-- Long hash: 0x000...000 (de-emphasize) -->
<highlight-word regex="0x[0-9a-fA-F]*" foregroundColor="DarkGray" wholeWords="true" />
<highlight-word regex="0x[0-9a-fA-F]*" foregroundColor="Gray" wholeWords="true" />
<!-- Units and unimportant states (de-emphasize) -->
<highlight-word regex="(ms|txs|MGas/s|MGas|t/s|b/s|Blk/s|Active: None|Sleeping: All|Sleeping: None|recv *0|proc *0)" foregroundColor="DarkGray" wholeWords="true" />
<highlight-word regex="(MB|processed:0|state:0|Refresh:0|Slots:0|Storages:0|Storages:0|Account:0)" foregroundColor="DarkGray" />
<highlight-word regex="(ms|txs|MGas/s|MGas|t/s|b/s|Blk/s|Active: None|Sleeping: All|Sleeping: None|recv *0|proc *0)" foregroundColor="Gray" wholeWords="true" />
<highlight-word regex="(MB|processed:0|state:0|Refresh:0|Slots:0|Storages:0|Storages:0|Account:0)" foregroundColor="Gray" />

<!-- Block gas report -->
<highlight-word regex="Gas gwei" foregroundColor="White" wholeWords="true" />
<!-- Block gas median gwei -->
<highlight-word regex="(?&lt;!(\| *)|\.)[1-9][0-9]{5,10}" foregroundColor="White" wholeWords="true" />
<highlight-word regex="(?&lt;!(\| *)|\.)[1-9][0-9]{5,10}" foregroundColor="Yellow" wholeWords="true" />
<!-- Block instructions report (de-emphasize) -->
<highlight-word regex="(sload|sstore|create|calls) +[0-9\,]+" foregroundColor="DarkGray" wholeWords="true" />
<highlight-word regex="(sload|sstore|create|calls) +[0-9\,]+" foregroundColor="Gray" wholeWords="true" />
<!-- Seperators (de-emphasize) -->
<highlight-word regex=" \| " foregroundColor="DarkGray" wholeWords="true" />
<highlight-word regex=" \| " foregroundColor="Gray" wholeWords="true" />
</target>

<!-- note: you need to specify `Seq.MinLevel` or this target will be removed. `Seq.ServerUrl` will always replace url here. -->
Expand Down

0 comments on commit 097e0f2

Please sign in to comment.