common: Deprecate TraceCompassLogUtils and use trace-event-logger lib#207
Conversation
d05f6b8 to
1f762a0
Compare
| * | ||
| * This method is mutually exclusive with | ||
| * {@link #setParentScope(FlowScopeLog)}. Calling both will throw an | ||
| * {@link #setParentScope(IFlowScopeLog)}. Calling both will throw an |
There was a problem hiding this comment.
This needs to be change to FlowScopeLog
| * | ||
| * This method is mutually exclusive with | ||
| * {@link #setParentScope(FlowScopeLog)}. Calling both will throw an | ||
| * {@link #setParentScope(IFlowScopeLog)}. Calling both will throw an |
There was a problem hiding this comment.
This needs to be change to FlowScopeLog
1f762a0 to
b4b9843
Compare
There was a problem hiding this comment.
I did a first pass. Please rebase this PR. The jsonify.sh script doesn't work anymore. Maybe copy the python script of the trace-event-logger repository.
With the deprecated logger, it was necessary to set -Dorg.eclipse.tracecompass.logging=true. The TraceCompassLogUtils class had code to disable the logging if that flag is not set. That's to avoid unnecessary logging due to unrelated logging.properties. We need to decide if we need this and where to set it if needed, either trace-event-logger level or in Trace Compass repo only.
The BUILDING.md file needs to be updated for the new usage of the library. Also, the logging.properties that is in the root folder of the repo needs to be updated. Mabye, we should have a couple examples with typical settings for different handlers including the FileHandler.
To make the AsyncFileHandler and SnapshotHandler work, you need to set the bootclasspath. From the RCP you can use the relative path. From the IDE development environment you will have to provide an absolute path.
-Xbootclasspath/a:./plugins/org.eclipse.tracecompass.trace-event-logger_0.2.0.jar
-Djava.util.logging.config.file=goodlogging.properties
-Dorg.eclipse.tracecompass.logging=true
b4b9843 to
b105c5d
Compare
The commit is rebased. The bash script jsonify.sh is changed to be a wrapper to download and execute jsonify.py from trace-event-logger repository. The downloaded script is added to .gitignore file. The property -Dorg.eclipse.tracecompass.logging=true is still needed as it activates the Logger instances that are passed to the trace-event-logger library. |
bhufmann
left a comment
There was a problem hiding this comment.
I was able to create a trace and load it into Trace Compass. Some small comments though.
jsonify.sh
Outdated
| #!/usr/bin/env bash | ||
| #******************************************************************************* | ||
| # Copyright (c) 2020 Ericsson | ||
| # Copyright (c) 2025 Ericsson |
| @@ -44,7 +44,7 @@ Trace Compass can be traced by doing the following in the launch configuration: | |||
| * -Djava.util.logging.config.file=%gitroot%/logging.properties (where %gitroot% is the directory tracecompass is checked out to) | |||
| * -Dorg.eclipse.tracecompass.logging=true | |||
There was a problem hiding this comment.
Should we add some description here on how to use the other handlers and how to make it work with the -Xbootclasspath setting? We should also have a reference link to the trace-event-logger documentation for more information.
The README.md in this repo should mention about tracing Trace Compass and have link to the chapter in BUILDING.md.
b105c5d to
627ad42
Compare
627ad42 to
1466723
Compare
bhufmann
left a comment
There was a problem hiding this comment.
Since the trace event logger v0.3.0. supports MXBeans, TraceCompassMonitorManager and related code can be deprecated as well
Deprecate TraceCompassLogUtils and TraceCompassMonitorManager. Replace all use of TraceCompassLogUtils with LogUtils from the trace-event-logger library. Update all targets to include the trace-event-logger jar from Maven. Add trace-event-logger plug-in to RCP feature and releng-site. Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
1466723 to
e42843d
Compare
bhufmann
left a comment
There was a problem hiding this comment.
Looks good to me. I tested it by creating a trace on my laptop with a local build. Thanks!
What it does
Deprecate TraceCompassLogUtils and TraceCompassMonitorManager.
Replace all use of TraceCompassLogUtils with LogUtils from the
trace-event-logger library.
Update all targets to include the trace-event-logger jar from Maven.
Add trace-event-logger plug-in to RCP feature and releng-site.
How to test
Unit tests.
Follow-ups
N/A
Review checklist