Skip to content

Commit 7c3bc92

Browse files
authored
Revert "Fix: colored output is lost with 25.7.0 (#9250)" (#9321)
* Revert "Fix: colored output is lost with 25.7.0 (#9250)" This reverts commit 42306f9. Signed-off-by: Sally MacFarlane <[email protected]> * changelog Signed-off-by: Sally MacFarlane <[email protected]> * kudos Signed-off-by: Sally MacFarlane <[email protected]> --------- Signed-off-by: Sally MacFarlane <[email protected]>
1 parent 1794d4b commit 7c3bc92

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

3-
## Unreleased
3+
## 25.10.0
4+
This is a recommended update for Hoodi users for the Fusaka hardfork.
45

56
### Breaking Changes
67

@@ -18,9 +19,9 @@
1819
- Add blockTimestamp to `eth_getLogs` result [#9278](https://github.com/hyperledger/besu/pull/9278)
1920
- Add `--ethstats-report-interval` CLI option to control ethstats reporting frequency instead of using hardcoded 5-second interval [#9271](https://github.com/hyperledger/besu/pull/9271)
2021
- Add `isCancelled` method to `TransactionEvaluationContext`. That way selectors could check if the block creation has been cancelled or in timeout [#9285](https://github.com/hyperledger/besu/pull/9285)
22+
- Performance improvements for MOD related opcodes [#9188](https://github.com/hyperledger/besu/pull/9188) thanks to [@thomas-quadratic](https://github.com/thomas-quadratic)
2123

2224
### Bug fixes
23-
- Fix loss of colored output in terminal when using `--color-enabled=true` option [#8908](https://github.com/hyperledger/besu/issues/8908)
2425

2526
## 25.10.0-RC2
2627
This RC is a pre-release, recommended update for Holesky and Sepolia users for the Fusaka hardfork.

app/src/main/java/org/hyperledger/besu/cli/logging/XmlExtensionConfiguration.java

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public Configuration reconfigure() {
6262
new XmlExtensionConfiguration(
6363
refreshedParent.getLoggerContext(),
6464
refreshedParent.getConfigurationSource().resetInputStream());
65-
refreshed.createConsoleAppender();
65+
createConsoleAppender();
6666
return refreshed;
6767
} catch (final IOException e) {
6868
LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME)
@@ -90,12 +90,11 @@ private void createConsoleAppender() {
9090
return;
9191
}
9292

93-
final boolean colorEnabled = getColorEnabled();
9493
final PatternLayout patternLayout =
9594
PatternLayout.newBuilder()
9695
.withConfiguration(this)
97-
.withDisableAnsi(!colorEnabled)
98-
.withNoConsoleNoAnsi(!colorEnabled)
96+
.withDisableAnsi(!BesuCommand.getColorEnabled().orElse(!noColorSet()))
97+
.withNoConsoleNoAnsi(!BesuCommand.getColorEnabled().orElse(false))
9998
.withPattern(
10099
String.join(
101100
SEP,
@@ -106,29 +105,11 @@ private void createConsoleAppender() {
106105
colorize("%msgc%n%throwable")))
107106
.build();
108107
final ConsoleAppender consoleAppender =
109-
ConsoleAppender.newBuilder()
110-
.setName("Console")
111-
.setTarget(ConsoleAppender.Target.SYSTEM_ERR)
112-
.setLayout(patternLayout)
113-
.build();
108+
ConsoleAppender.newBuilder().setName("Console").setLayout(patternLayout).build();
114109
consoleAppender.start();
115-
116-
// Remove existing Console appender if present to avoid duplicate output
117-
if (this.getRootLogger().getAppenders().containsKey("Console")) {
118-
this.getRootLogger().removeAppender("Console");
119-
}
120-
121110
this.getRootLogger().addAppender(consoleAppender, null, null);
122111
}
123112

124-
private boolean getColorEnabled() {
125-
try {
126-
return BesuCommand.getColorEnabled().orElse(!noColorSet());
127-
} catch (NoClassDefFoundError | ExceptionInInitializerError e) {
128-
return !noColorSet();
129-
}
130-
}
131-
132113
private static boolean noColorSet() {
133114
return System.getenv("NO_COLOR") != null;
134115
}

0 commit comments

Comments
 (0)