You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Timothee Maret (Jira)" <ji...@apache.org> on 2021/01/27 09:48:00 UTC
[jira] [Updated] (SLING-10095) Add a tracker to log content package
extractor operations
[ https://issues.apache.org/jira/browse/SLING-10095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothee Maret updated SLING-10095:
-----------------------------------
Description:
The [ContentPackageExtractor|https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/02846937fa0e07d183f50484bc68e028337c3fe5/src/main/java/org/apache/sling/distribution/journal/bookkeeper/ContentPackageExtractor.java] should report its progress in the logs. This will allow to pin point exactly which path is the root cause of import problems.
FileVault allows to plug a ProgressTrackerListener for that purpose.
We'd need to add set a progress tracker listener instance on the ImportOption [here|https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/02846937fa0e07d183f50484bc68e028337c3fe5/src/main/java/org/apache/sling/distribution/journal/bookkeeper/ContentPackageExtractor.java#L99] and have that tracker log progress.
To avoid flooding the logs, we may keep standard messages at debug level but keep error messages at ERROR levels.
{code}
ImportOptions opts = new ImportOptions();
opts.setListener(new ProgressTrackerListener() {
@Override
public void onMessage(Mode mode, String s, String s1) {
log.debug(...);
}
@Override
public void onError(Mode mode, String s, Exception e) {
log.error(...);
}
});
{code}
was:
The [ContentPackageExtractor|https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/02846937fa0e07d183f50484bc68e028337c3fe5/src/main/java/org/apache/sling/distribution/journal/bookkeeper/ContentPackageExtractor.java] should report its progress in the logs. This will allow to pin point exactly which path is the root cause of import problems.
FileVault allows to plug a ProgressTrackerListener for that purpose.
We'd need to add set a progress tracker listener instance on the ImportOption [here|https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/02846937fa0e07d183f50484bc68e028337c3fe5/src/main/java/org/apache/sling/distribution/journal/bookkeeper/ContentPackageExtractor.java#L99] and have that tracker log progress.
{code}
ImportOptions opts = new ImportOptions();
opts.setListener(new ProgressTrackerListener() {
@Override
public void onMessage(Mode mode, String s, String s1) {
log.info(...);
}
@Override
public void onError(Mode mode, String s, Exception e) {
log.error(...);
}
});
{code}
> Add a tracker to log content package extractor operations
> ----------------------------------------------------------
>
> Key: SLING-10095
> URL: https://issues.apache.org/jira/browse/SLING-10095
> Project: Sling
> Issue Type: Improvement
> Components: Content Distribution
> Affects Versions: Content Distribution Journal Core 0.1.6
> Reporter: Timothee Maret
> Priority: Major
> Fix For: Content Distribution Journal Core 0.1.18
>
>
> The [ContentPackageExtractor|https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/02846937fa0e07d183f50484bc68e028337c3fe5/src/main/java/org/apache/sling/distribution/journal/bookkeeper/ContentPackageExtractor.java] should report its progress in the logs. This will allow to pin point exactly which path is the root cause of import problems.
> FileVault allows to plug a ProgressTrackerListener for that purpose.
> We'd need to add set a progress tracker listener instance on the ImportOption [here|https://github.com/apache/sling-org-apache-sling-distribution-journal/blob/02846937fa0e07d183f50484bc68e028337c3fe5/src/main/java/org/apache/sling/distribution/journal/bookkeeper/ContentPackageExtractor.java#L99] and have that tracker log progress.
> To avoid flooding the logs, we may keep standard messages at debug level but keep error messages at ERROR levels.
> {code}
> ImportOptions opts = new ImportOptions();
> opts.setListener(new ProgressTrackerListener() {
> @Override
> public void onMessage(Mode mode, String s, String s1) {
> log.debug(...);
> }
> @Override
> public void onError(Mode mode, String s, Exception e) {
> log.error(...);
> }
> });
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)