ISSUE DESCRIPTION gRPC ManagedChannelImpl log messages contain unsubstituted…
- User
ISSUE DESCRIPTION
gRPC ManagedChannelImpl log messages contain unsubstituted placeholders Affected version: ArcadeDB server 26.4.2 Component: logging — bridge between gRPC's java.util.logging and the server's SLF4J/Logback backend
Summary
Some WARNING messages emitted by gRPC's ManagedChannelImpl are written to the ArcadeDB server log with the original MessageFormat placeholders ({0}, {1}) left literal instead of being substituted with the actual values.
Example
2026-05-21 06:53:11.234 WARNI [ManagedChannelImpl] [{0}] Failed to resolve name. status={1} 2026-05-21 06:53:11.234 WARNI [ManagedChannelImpl] [{0}] Failed to resolve name. status={1}
Expected (illustrative):
WARNI [ManagedChannelImpl] [channel-7] Failed to resolve name. status=UNAVAILABLE: Unable to resolve host vcc-superx-arcadedb-2.…
Root cause (suspected)
gRPC's internal loggers use java.util.logging with MessageFormat-style placeholders. The bridge that forwards JUL records to the ArcadeDB logging backend (SLF4J/Logback) is not translating {0}, {1} parameters into the SLF4J {} style, so the parameter array is dropped and the raw template ends up in the log file. Confirmation: the same logical event is also logged elsewhere (via GrpcLogAppender / AppendLogResponseHandler) with the full formatted message, so the data exists — it's just lost on the ManagedChannelImpl path.
Impact
Low severity but operationally annoying — these log lines carry zero information, so anyone scanning logs for the actual channel and gRPC status gets a stream of [{0}] Failed to resolve name. status={1} that they then have to correlate with neighbouring lines.
Suggested fix
Either:
- Install SLF4JBridgeHandler (org.slf4j:jul-to-slf4j) and ensure it translates JUL LogRecord.parameters via MessageFormat.format(...) before delegating to SLF4J; or
- Configure a JUL Handler for the io.grpc logger that uses a SimpleFormatter-compatible formatter so parameters are substituted before the message reaches the SLF4J side.
Environment
- ArcadeDB 26.4.2, default packaging
- Logs viewed via kubectl logs; same behaviour observed across all 3 HA pods
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can use and to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call ) using or commands. However you don't need to use or before submitting your changes. In fact, only submits currently unstaged changes because it uses to get the changes that need to be submitted. Assistant
I'll start by exploring the repository structure to understand the codebase and find the relevant logging components.
Assistant
This is a Java/Maven project. The issue is about logging - specifically about the bridge between gRPC's java.util.logging and the server's SLF4J/Logback backend. Let me search for logging-related files, especially anything related to JUL (java.util.logging) bridges.
Assistant
Let me look at the logging-related files in the engine module:
Assistant
I found the issue! In
LogFormatter.java, thecustomFormatMessagemethod usesmessage.formatted(additionalArgs)which uses Java'sString.format()style formatting (with%s,%d, etc.), but gRPC usesMessageFormatstyle placeholders ({0},{1}). Let me verify this and look at the AnsiLogFormatter too:Assistant
Now I can see the problem clearly. Both
LogFormatterandAnsiLogFormatterusemessage.formatted(additionalArgs)which expects Java'sString.format()style placeholders (like%s,%d), but gRPC's java.util.logging usesMessageFormatstyle placeholders ({0},{1}).When the format strings don't match, the
IllegalFormatExceptionis caught and the raw message (with unsubstituted{0},{1}placeholders) is logged.Let me search for how this formatter is used and confirm the fix approach:
Assistant
Let me look at how java.util.logging works. The standard
SimpleFormatterin JUL usesMessageFormatfor formatting messages with parameters. Let me check the tests to understand the expected behavior:Assistant
Now let me understand the issue better. The problem is that
java.util.loggingusesMessageFormatfor formatting (with{0},{1}placeholders), but the ArcadeDBLogFormatterusesString.formatted()which expectsString.format()style (with%s,%d).Let me create a test script to confirm the issue:
Assistant
This confirms the issue. The
String.formatted()method doesn't recognize{0},{1}as placeholders (those areMessageFormatstyle), so it just returns the original string with the placeholders unsubstituted. TheMessageFormat.format()method correctly substitutes the values.Now let me fix the
LogFormatter.javaandAnsiLogFormatter.javato useMessageFormat.format()instead ofString.formatted():Assistant
Now I'll fix the
LogFormatter.javato useMessageFormat.format()instead ofString.formatted():Assistant
Now I need to also remove the try-catch block since
MessageFormat.format()doesn't throwIllegalFormatException:Assistant
The try-catch block is still there but
MessageFormat.format()can throwIllegalArgumentExceptionfor bad formats. However, it won't throwIllegalFormatExceptionwhich is specific toString.format(). Let me keep the try-catch but update it to catch the appropriate exception type, or simply remove it sinceMessageFormat.format()handles most cases gracefully:Assistant
I see there's an extra closing brace and indentation issues. Let me fix this properly:
Assistant
Let me use the edit command to make precise changes:
Assistant
I see the edit didn't work correctly - it replaced lines but left remnants. Let me revert and do it properly:
Assistant
Now I can see the exact lines. Lines 86-94 need to be replaced. Let me use the edit command with proper indentation:
Assistant
The
LogFormatter.javafile is now correctly updated. Now I need to apply the same fix toAnsiLogFormatter.java:Assistant
Now I need to apply the same fix to
AnsiLogFormatter.java. Lines 76-84 need to be replaced:Assistant
Now I need to add the
MessageFormatimport toAnsiLogFormatter.java. Let me check if it's already imported:Assistant
I need to add the
java.text.MessageFormatimport. Let me add it:Assistant
Both files are now fixed. Let me verify the changes by checking the diff:
Assistant
I notice that the
import java.util.logging.*;line was removed in the diff. Let me check if that's correct:Assistant
The
import java.util.logging.*;was accidentally removed. I need to add it back sinceLogRecordandLevelare used in the file (thoughLevelis imported statically):Assistant
Now let me verify the final diff looks correct:
Assistant
The diff looks correct. Now let me build and run the tests to make sure the changes compile and work correctly:
Assistant
The code compiles successfully. Now let me run the existing tests to make sure nothing is broken:
Assistant
The tests passed (no test failure output). Let me also create a test script to verify that the fix works correctly with MessageFormat-style placeholders:
Assistant
The fix works correctly for gRPC-style MessageFormat placeholders. However, I notice that Test 4 shows that printf-style placeholders (
%s,%d) will not be substituted byMessageFormat.format(). This could be a breaking change if any code in ArcadeDB uses printf-style formatting.Let me check how messages are logged in the codebase to understand if this could be an issue:
Assistant
I see that the codebase uses
LogManager.instance().log()with printf-style placeholders (%s,%d). Let me check howLogManagerhandles the formatting:Assistant
I see - the
LogManageris ArcadeDB's own logging API that delegates to aLoggerimplementation. Let me check howDefaultLoggerhandles the formatting:Assistant
I see! Looking at
DefaultLogger.java, I can see that:-
When ArcadeDB's
LogManager.instance().log()is used, the message is already formatted usingmessage.formatted(args)inDefaultLogger(using printf-style) before it's passed tojava.util.logging.Logger.log(). -
The
LogFormatterandAnsiLogFormatterclasses are used by JUL handlers to formatLogRecordobjects. The issue is that when gRPC logs directly to JUL (not through ArcadeDB's LogManager), it createsLogRecordobjects withMessageFormat-style placeholders ({0},{1}) in the message and the parameters in theparametersarray.
So my fix is correct - the
LogFormatterandAnsiLogFormattershould useMessageFormat.format()because that's the standard way JUL expects formatters to handle message parameters (as documented injava.util.logging.Formatter).Let me verify this is how JUL's
SimpleFormatterworks:-
Assistant
This confirms that
SimpleFormatter(JUL's standard formatter) correctly formats{0}and{1}placeholders usingMessageFormat. The ArcadeDB custom formatters should behave the same way, and my fix achieves that.Now let me run more comprehensive tests to make sure everything works:
Assistant
All 4 tests pass. Let me also create a more comprehensive test to verify the fix works correctly for the gRPC logging scenario:
Assistant
Let me compile first and then run the test:
Assistant
Excellent! All tests pass! The fix is working correctly:
- gRPC-style
{0},{1}placeholders are now properly substituted with their actual values - Messages without parameters still work correctly
- Both
LogFormatterandAnsiLogFormatterwork correctly
Let me run a broader set of tests to make sure I haven't broken anything:
- gRPC-style
Assistant
The test is taking too long. Let me just run a smaller subset of tests or check for any compilation errors.
Assistant
Let me verify the final state of the changes:
Assistant
Let me verify the files one more time to make sure they are syntactically correct:
Assistant
Both files look correct. Let me clean up the temporary test files and do a final verification:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.