Skip to content

Commit

Permalink
Only warn with error message unless debug is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovds committed Oct 21, 2024
1 parent 817f011 commit 1334a20
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ public ArchetypeCatalog getInternalCatalog() {

return source.getArchetypeCatalog(null, null);
} catch (ArchetypeDataSourceException e) {
getLogger().warn("failed to read catalog", e);
getLogger()
.warn(
"failed to read catalog: " + e.getMessage(),
getLogger().isDebugEnabled() ? e : null);
return new ArchetypeCatalog();
}
}
Expand All @@ -158,7 +161,10 @@ public ArchetypeCatalog getLocalCatalog(RepositorySystemSession repositorySessio

return source.getArchetypeCatalog(repositorySession, null);
} catch (ArchetypeDataSourceException e) {
getLogger().warn("failed to read catalog", e);
getLogger()
.warn(
"failed to read catalog: " + e.getMessage(),
getLogger().isDebugEnabled() ? e : null);
return new ArchetypeCatalog();
}
}
Expand All @@ -171,7 +177,10 @@ public ArchetypeCatalog getRemoteCatalog(

return source.getArchetypeCatalog(repositorySession, remoteRepositories);
} catch (ArchetypeDataSourceException e) {
getLogger().warn("failed to download from remote", e);
getLogger()
.warn(
"failed to download from remote" + e.getMessage(),
getLogger().isDebugEnabled() ? e : null);
return new ArchetypeCatalog();
}
}
Expand Down

0 comments on commit 1334a20

Please sign in to comment.