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
Interface
No new interfaces are introduced.
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 using command. 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 analyze the issue:
- gRPC's ManagedChannelImpl log messages contain unsubstituted placeholders ({0}, {1}) instead of actual values
- The bridge between Java Util Logging (JUL) and SLF4J/Logback is not translating the MessageFormat-style placeholders
- The fix should install/configure SLF4JBridgeHandler or a JUL Handler that properly formats the parameters
Let me start by exploring the repository structure to understand how logging is configured.
Assistant
Let me look at the repository structure first, then find logging-related files.
Assistant
Let me look at the server module and logging-related files.
<tool_call> <function=bash_terminal> <parameter=command> grep -r "jul-to-slf4j|SLF4JBridgeHandler|java.util.logging|JUL|SimpleFormatter" /arcadedb --include=".java" --include=".xml" --include=".properties" -l 2>/dev/null </tool_call> <tool_call> <function=bash_terminal> <parameter=command> grep -r "ManagedChannelImpl|grpc.log|GrpcLog" /arcadedb --include=".java" -l 2>/dev/null </tool_call> <tool_call> <function=bash_terminal> <parameter=command> grep -r "logback|Logback|log4j|SLF4J" /arcadedb --include=".xml" --include="*.properties" -l 2>/dev/null </tool_call>
Assistant
The grep commands were combined incorrectly. Let me run them separately.
Assistant
Now let me look at the key files related to logging -
ServerLogManager.javaand the grpc-related logging files:Assistant
The tool call format should have proper tool name and parameters. Let me try with the correct format.
Assistant
This is the ServerLogManager but it doesn't seem to have any JUL-to-SLF4J bridge configuration. Let me look for the logging configuration and where logging is set up.
Assistant
Let me look at the main server file to understand how logging is initialized and find where JUL is connected to the ArcadeDB logging system.
Assistant
Now let me examine the logging classes to understand how the JUL-to-SLF4J bridge is set up:
Assistant
I need to understand the logging bridge. Let me look at the DefaultLogger and how JUL is connected to SLF4J/Logback.
Assistant
Let me look at the log configuration files and understand how JUL is being handled:
Assistant
Looking at the issue, the problem is that gRPC's ManagedChannelImpl log messages contain unsubstituted placeholders like
{0},{1}instead of the actual values. The root cause is that gRPC uses java.util.logging (JUL) with MessageFormat-style placeholders, but the bridge to SLF4J/Logback isn't translating these.The DefaultLogger class already formats messages using
String.format()before passing to JUL, but the issue is that gRPC's internal loggers use JUL directly withLogRecord.parameterscontaining the substitution values, notString.format()style placeholders.The fix is to install an SLF4JBridgeHandler that properly translates JUL LogRecord parameters before delegating to SLF4J.
I need to:
- Add the
jul-to-slf4jdependency to the pom.xml - Install the SLF4JBridgeHandler in DefaultLogger or ArcadeDBServer
Wait, but looking at this more carefully - the DefaultLogger is using JUL (java.util.logging.Logger), not SLF4J. The issue is that gRPC's ManagedChannelImpl uses JUL directly and passes parameters via , but the JUL handlers in ArcadeDB aren't formatting these parameters.
- Add the
Assistant
Let me check the pom.xml for dependencies and understand the logging setup better:
Assistant
Let me check if there's any existing SLF4J to JUL bridge setup. The issue is that gRPC uses JUL (java.util.logging) directly, and when it logs messages with
{0},{1}placeholders (MessageFormat-style), these parameters are stored in the LogRecord's parameters array, not in the message string itself. The current JUL handlers in ArcadeDB don't format these parameters.Looking at the pom.xml, they already use
slf4j-jdk14which bridges SLF4J to JUL. But the reverse bridge (JUL to SLF4J) is what we need - that'sjul-to-slf4j.The solution is:
- Add the
jul-to-slf4jdependency - Install the SLF4JBridgeHandler in the DefaultLogger initialization
Let me look at what the pom.xml structure looks like for dependencies:
- Add the
Assistant
Now I understand the situation better. The pom.xml already has
slf4j-jdk14which bridges SLF4J to JUL. But the issue is that gRPC uses JUL directly with MessageFormat-style placeholders like{0},{1}in LogRecord parameters, and the JUL handlers don't format these parameters.The fix should be to install
org.slf4j.jul.SLF4JBridgeHandler(fromjul-to-slf4jlibrary) for theio.grpclogger hierarchy. This will forward JUL log records from gRPC to SLF4J, which will properly format the parameters.Let me check how the DefaultLogger is initialized and where I should add the bridge handler installation.
Assistant
Looking at the issue more carefully:
- gRPC's ManagedChannelImpl uses java.util.logging (JUL) and logs messages with MessageFormat-style placeholders like
{0},{1} - The placeholders are stored in
LogRecord.getMessage()while the actual values are stored inLogRecord.parameters[] - The JUL handlers in ArcadeDB aren't formatting these parameters properly
The fix needs to be in the DefaultLogger.java file. The key is that when gRPC logs messages, the message template contains
{0},{1}placeholders and the values are in the parameters array. The JUL handlers need to useMessageFormat.format()to substitute these.Looking at the DefaultLogger code:
- gRPC's ManagedChannelImpl uses java.util.logging (JUL) and logs messages with MessageFormat-style placeholders like
Assistant
Now let me understand the approach better. The issue is that gRPC's ManagedChannelImpl logs JUL messages with
{0},{1}style placeholders that get passed as LogRecord.parameters. The current JUL handlers don't format these parameters.The fix requires:
- Adding
jul-to-slf4jdependency to pom.xml - Installing SLF4JBridgeHandler in DefaultLogger to bridge JUL (from gRPC) to SLF4J (which Arcadedb uses)
Let me start by adding the dependency:
- Adding
Assistant
Let me analyze the issue and plan my approach.
The issue is that gRPC's ManagedChannelImpl log messages contain unsubstituted placeholders ({0}, {1}) instead of actual values. This happens because:
- gRPC uses java.util.logging (JUL) internally
- gRPC's log messages use MessageFormat-style placeholders ({0}, {1}) stored in the message string
- The actual values are stored in the LogRecord.parameters[] array
- The JUL handlers in ArcadeDB don't format these parameters, so the raw template appears in logs
The fix is to install the SLF4JBridgeHandler from jul-to-slf4j library. This handler bridges JUL to SLF4J and properly handles parameter substitution.
I need to:
- Add the
jul-to-slf4jdependency to pom.xml - Install the SLF4JBridgeHandler in DefaultLogger.java for the io.grpc logger
Let me proceed step by step.
Assistant
Let me analyze the issue and plan the fix:
Issue: gRPC's ManagedChannelImpl log messages contain unsubstituted placeholders ({0}, {1}) instead of actual values. This is because gRPC uses java.util.logging (JUL) with MessageFormat-style placeholders, and the JUL handlers in ArcadeDB don't format these parameters.
Root Cause: The JUL log records from gRPC have the template message (e.g.,
[{0}] Failed to resolve name. status={1}) with actual values stored inLogRecord.parameters[]. The current JUL handlers don't apply parameter formatting.Fix: Install the SLF4JBridgeHandler from
jul-to-slf4jlibrary for theio.grpclogger hierarchy. This handler bridges JUL to SLF4J and properly handles parameter substitution using SLF4J's formatting.Let me implement this fix:
Step 1: Add the
jul-to-slf4jdependency to pom.xmlAssistant
Let me plan my fix before implementing:
Issue: gRPC's ManagedChannelImpl log messages contain unsubstituted placeholders ({0}, {1}) instead of actual values. This is because gRPC uses java.util.logging (JUL) with MessageFormat-style placeholders, and the JUL handlers in ArcadeDB don't format these parameters.
Fix: Install the SLF4JBridgeHandler from
jul-to-slf4jlibrary for theio.grpclogger hierarchy. This handler bridges JUL to SLF4J and properly handles parameter substitution.Steps:
- Add the
jul-to-slf4jdependency to pom.xml - Install SLF4JBridgeHandler in DefaultLogger.java for the
io.grpclogger
Let me implement:
Step 1: Add the
jul-to-slf4jdependency to pom.xml- Add the
Assistant
Let me use bash to make the edit to pom.xml:
Assistant
I need to add the jul-to-slf4j dependency after the slf4j-jdk14 dependency. Let me use sed to insert the new dependency after line 511 (the line with for slf4j-jdk14).
Assistant
I need to add the
jul-to-slf4jdependency to the pom.xml and then install the SLF4JBridgeHandler for io.grpc loggers. Let me do this step by step.First, let me add the dependency to pom.xml using sed:
Assistant
Let me verify the pom.xml change was applied correctly:
Assistant
Good, the dependency is added. Now I need to modify the DefaultLogger.java to install the SLF4JBridgeHandler for the io.grpc logger. Let me look at the installCustomFormatter method more closely to understand where to add the bridge handler installation.
Assistant
I need to modify the DefaultLogger.java file to install the SLF4JBridgeHandler for the io.grpc logger. Let me first check what imports are needed:
Assistant
I need to modify the DefaultLogger.java file to install the SLF4JBridgeHandler for the io.grpc logger. Let me add the import first.
Assistant
Let me use sed or a different approach since python3 is not available.
Assistant
Let me use sed to make the changes to the DefaultLogger.java file.
Assistant
Now I need to add the method call to install the gRPC JUL to SLF4J bridge. Let me find the exact location in the installCustomFormatter method where I need to add it, and also add the actual method implementation.
First, let me verify the import was added:
Assistant
Good, the import was added. Now I need to add the method call and the actual method implementation. Let me find the exact location in the installCustomFormatter method:
Assistant
I need to add the method call
installGrpcJulToSlf4jBridge()before line 237 (theif (!installCustomFormatter)check), and also add the method implementation. Let me look at the context around lines 234-245 to understand where exactly to insert the call.Assistant
I need to add a call to
installGrpcJulToSlf4jBridge()before theif (!installCustomFormatter)check. Let me use sed to insert the call:Assistant
Let me verify the change was made correctly:
Assistant
The sed command inserted the code in the wrong place (twice). Let me fix this by viewing the entire installCustomFormatter method and correcting it.
Assistant
The file got corrupted with duplicate insertions. Let me restore it and apply the fix correctly.
Assistant
Let me verify the file is restored and apply the changes correctly using a more careful approach:
Assistant
Good, the file is restored. Let me apply the changes more carefully this time. I'll use sed with precise line numbers.
Assistant
Let me apply the changes more carefully using sed with specific line numbers:
Assistant
Now I need to add the method call and the actual method implementation. Let me find the right line numbers:
Assistant
The
!is being interpreted by bash. Let me escape it.Assistant
Let me now look at the file around line 237 to understand the context better and add the method call and implementation correctly.
Assistant
I need to add the method call before line 237 (the
if (!installCustomFormatter)line) and also add the actual method implementation somewhere in the class.Let me use a different approach - I'll use sed to insert the method call after line 236 and then add the method implementation at the end of the class.
Assistant
Now I need to verify the change and add the method implementation at the end of the class.
Assistant
The method call was added, but the indentation is off. Let me fix it and also add the actual method implementation. First, let me find the end of the class to add the new method:
Assistant
Let me check the end of the file to see where I should add the new method:
Assistant
Now I need to add the method implementation before the closing brace of the class. Let me insert it at line 463 (before the final
}):Assistant
Let me verify the changes were applied correctly:
Assistant
The insertion created a syntax issue - the flush method's closing brace is missing and there's an extra
}. Let me fix this:Assistant
I see the problem - the flush method's closing brace was removed and there are extra braces. Let me fix this:
Assistant
Let me take a more careful approach. I'll restore the file and use a different strategy.
Assistant
Let me look at the end of the file more carefully to understand the structure before making changes. I need to see the flush method and the closing brace of the class.
Assistant
Let me use a more robust approach by creating a modified copy of the file:
Assistant
I see there's an extra
}that was inserted. Let me fix that:Assistant
I see there's an extra
}at line 464. Let me fix that and apply the file:Assistant
I see there's still an issue - the flush method's closing brace is missing. Let me fix this properly:
Assistant
I see the issue now. The flush method ends at line 460 with
}and the class ends at line 461 with}. I need to insert my new method between lines 460 and 461, but the previous awk script was inserting an extra}. Let me redo this more carefully:Assistant
I see the diff shows an extra
}at line 464. Let me fix this:Assistant
The flush method is missing its closing brace. Let me look at the original file:
Assistant
I see the issue - the flush method is missing its closing brace. Let me fix this:
Assistant
The file structure is getting corrupted. Let me restore and take a completely different approach:
Assistant
Let me take a completely different approach and create a Python script to make the modifications properly:
Assistant
Let me use python3 to properly modify the DefaultLogger.java file:
Assistant
Now let me use python3 to properly modify the DefaultLogger.java file:
Assistant
Let me verify the changes were applied correctly:
Assistant
The import was added correctly. Let me check the method call location:
Assistant
The method call was added correctly. Let me verify the method implementation at the end of the file:
Assistant
The changes look correct. Let me verify the pom.xml changes are still in place and then try to compile to make sure everything is correct:
Assistant
Let me verify the pom.xml changes are complete and then try to compile:
Assistant
The pom.xml changes look correct. Now let me verify the changes compile correctly by trying to build the engine module:
Assistant
The maven wrapper requires HOME to be set. Let me set it and try again.
Assistant
The compilation error shows that
SLF4JBridgeHandler.install()doesn't take a Logger argument - it installs on the root logger only. I need to use a different approach. Instead of using SLF4JBridgeHandler (which replaces all JUL handlers on root), I should create a custom JUL handler for the io.grpc logger that properly formats MessageFormat-style placeholders.Assistant
The compilation error shows that
SLF4JBridgeHandler.install()doesn't accept a Logger argument. I need to fix this. TheSLF4JBridgeHandler.install()method only installs on the root logger.Let me take a different approach: I'll create a custom JUL handler for the io.grpc logger that properly formats MessageFormat-style placeholders ({0}, {1}) using Java's
MessageFormat.format()method.Assistant
Let me verify the changes were applied correctly:
Assistant
The import was added. Let me check the rest of the changes:
Assistant
The method call was added. Let me check the method implementation at the end of the file:
Assistant
Now let me compile to verify the changes work:
Assistant
The compilation error shows that the
close()method in the handler shouldn't throwjava.io.IOExceptionsince the parent class method doesn't throw it. Let me fix this by removing thethrowsclause from theclose()method.I need to fix the
close()method in theGrpcLogHandlerclass to not throwjava.io.IOException.Assistant
I need to fix the compilation error. The
close()method inGrpcLogHandlershouldn't throwjava.io.IOExceptionsince the parent class method doesn't throw it. Let me fix this:Assistant
The user wants me to fix the compilation error. The
close()method inGrpcLogHandlershould not throwjava.io.IOExceptionsince the parent class method doesn't throw it. I already ran the sed command to fix this, but I need to verify and compile again.Assistant
The
close()method now doesn't throwjava.io.IOException. Let me try to compile again.Assistant
The compilation succeeded. Now let me verify the fix by reviewing the changes and creating a test to confirm it works:
Assistant
Looking at my implementation, I notice there might be an issue with double-publishing since JUL already has standard delegation to parent loggers. Let me simplify the GrpcLogHandler to let JUL's standard delegation handle the forwarding:
Assistant
Let me verify the changes were applied correctly and test the compilation.
Assistant
Let me check the current state of the file and try to compile:
Assistant
The compilation succeeded. Now let me create a test to verify that the fix works correctly:
Assistant
The test confirms that MessageFormat.format() correctly substitutes {0}, {1} placeholders with actual values. Now let me run the existing tests to make sure the fix doesn't break anything.
Assistant
The logger test passed. Let me also run a few more tests to make sure the changes don't break anything else:
Assistant
The user is continuing the session. I need to install the compiled artifacts so that the server module tests can run. Let me install the engine module first and then run the tests.
Assistant
Good. Now let me install the other necessary modules and run the tests:
Assistant
Now let me review the final state of changes and run the server tests:
Assistant
I need to verify that the existing tests pass and summarize my changes. Let me check the current state of the code and run some relevant tests.
Assistant
The tests passed. Let me do a final review of all changes and verify everything is correct before submitting.
Assistant
The fix is complete. Let me verify everything is in order by running a broader test suite to ensure the changes don't break any existing functionality:
Assistant
Let me run a quicker targeted test to verify the fix doesn't break anything:
Assistant
The LoggerTest passed. Let me now verify the changes are complete and submit.
Assistant
Let me do a final verification that the fix is complete and the code compiles correctly:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.