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
Let me start by understanding the repository structure and finding the relevant code for the issue. The issue is about gRPC's
ManagedChannelImpllog messages containing unsubstituted placeholders like{0},{1}instead of actual values. This happens because gRPC usesjava.util.logging(JUL) withMessageFormat-style placeholders, but the bridge to SLF4J/Logback doesn't translate them.Let me explore the repository structure first.
Assistant
Let me explore the relevant parts of the codebase. The issue mentions gRPC, logging, and the server module. Let me look for JUL-to-SLF4J bridge related code.
Assistant
Let me look for the relevant logging configuration and the SLF4JBridgeHandler usage.
Assistant
No SLF4JBridgeHandler found — that confirms the root cause. Let me now dig into the logging configuration and find where the logging is set up.
Assistant
Let me look at the server module for logging setup:
Assistant
Let me find where the server starts - look for main methods or ArcadeDBServer class.
Assistant
Let me look at the engine module and find where logging is configured.
Assistant
Let me look at the engine module and the core logging infrastructure
Assistant
Let me look at the Logger, LogManager, and DefaultLogger classes:
Assistant
Let me just cat the files instead.
Assistant
Now let me look at the Logger interface and DefaultLogger:
Assistant
Let me search for the SLF4J-based Logger implementation:
Assistant
Let me look at the DefaultLogger:
Assistant
Let me look at the log formatters used:
Assistant
Now I see the root issue! The
LogFormatter.customFormatMessageusesString.formatted()(Java'sFormatterstyle%s), but gRPC usesjava.text.MessageFormatstyle ({0},{1}). WhenString.formatted()encounters{0}, it throwsIllegalFormatException, leaving the raw unsubstituted message.Let me look at the
AnsiLogFormattertoo:Assistant
Now I fully understand the issue.
Root cause: Both
LogFormatterandAnsiLogFormatteruseString.formatted()to format log messages, which uses Java'sFormattersyntax (%s). But gRPC usesjava.text.MessageFormatsyntax ({0},{1}). Since{0}is not a valid%specifier,String.formatted()just leaves it literal — and the parameters are ignored.Let me also check the
DefaultLoggerto confirm:Assistant
Let me check if there's an existing test for the formatters:
Assistant
Let me look at the LoggerTest:
Assistant
Now let me create a quick script to confirm the issue, then fix both formatters.
Assistant
This confirms the issue.
String.formatted()leaves{0}unsubstituted, whileMessageFormat.format()handles it correctly.Now let me look at the full
LogFormatter.javafile to make the edit:Assistant
Let me go back to the repo root and edit the files directly
Assistant
Now let me edit the
LogFormatter.javato fix the formatting issue. I need to modify thecustomFormatMessagemethod to also handle{0}style MessageFormat placeAssistant
Let me use
replaceto make targeted edits instead. First, let me add thejava.text.*import:Assistant
I see a duplicate import. Let me fix that and then update the formatting logic:
Assistant
Now let me replace the formatting block in
customFormatMessageand add the helperAssistant
Now let me fix the
AnsiLogFormatter.javathe same way:Assistant
Now let me fix the
AnsiLogFormatter.javato use the inheritedformatMessageAssistant
Let me use a script to make this edit instead
Assistant
Python3 not found. Let me try python or use sed directly.
Assistant
Let me try the replace command with a simpler approach - using a single-line replacement with sed:
Assistant
Let me verify the AnsiLogFormatter.java changes
Assistant
The sed command didn't work correctly. Let me restore and use a different approach.
Assistant
Let me write a Java program to make the edit properly:
Assistant
Let me verify both files are correct now:
Assistant
Both files look correct. Let me now try to compile the engine module to verify the changes compile
Assistant
Let me set HOME and try again:
Assistant
The code compiles successfully. Let me now run the existing LoggerTest to make sure nothing is broken:
Assistant
The test passed. Now let me write a small Java test to confirm the fix actually resolves the issue with gRPC-style messages:
Assistant
All tests pass. Let me also run some edge case tests:
Assistant
Edge cases look reasonable. Let me now run the full engine test suite to make sure nothing else is broken:
Assistant
Let me check if there are any other formatter implementations I might have missed:
Assistant
Only the two formatters exist, and both have been fixed. Let me clean up temporary files and verify the final state:
Assistant
Let me see the final changes made:
Assistant
Let me verify the import was added correctly:
Assistant
The import is there. But the diff didn't show it because it seems the git diff doesn't show the import change. Let me check more carefully:
Assistant
Let me check if the import change is captured:
Assistant
Let me check if the import was already in the original:
Assistant
The import
java.text.*was already in the original file. The changes are exactly what's needed. Let me verify the final state of both files one more time and then submit.Assistant
The changes look good. Let me now submit.
Here's a summary of my checklist:
-
Successfully reproduced the error: I confirmed that
String.formatted()ignores{0},{1}MessageFormat-style placeholders (used by gRPC), leaving them unsubstituted in the log output. -
Confirmed fix resolves the error: Both
LogFormatterandAnsiLogFormatternow correctly substitute{0}{1}placeholders while preserving the existing%s-style formatting for ArcadeDB's own messages. -
Thought about edge cases:
- Messages with no parameters → passes through unmodified
- Messages with parameters but no placeholders → handled gracefully
- JSON-like content with curly braces
{"key": "value"}→ correctly ignored (regex requires digit after{) {0,number}extended MessageFormat patterns → handled- MessageFormat throws exception (e.g., invalid format) → falls back to
String.formatted()
-
Ran existing tests:
LoggerTestpasses successfully
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.