mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
improve logging of default plugin scanner
This commit is contained in:
@@ -145,12 +145,11 @@ public class DefaultPluginScanner implements PluginScanner
|
|||||||
* @param filter
|
* @param filter
|
||||||
*/
|
*/
|
||||||
private void scannDirectory(PluginBackend backend, Set<File> scannedFiles,
|
private void scannDirectory(PluginBackend backend, Set<File> scannedFiles,
|
||||||
Set<PluginInformation> plugins, File directory,
|
Set<PluginInformation> plugins, File directory, FileFilter filter)
|
||||||
FileFilter filter)
|
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isTraceEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("scann directory {}", directory.getPath());
|
logger.trace("scann directory {}", directory.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
File[] files = directory.listFiles(filter);
|
File[] files = directory.listFiles(filter);
|
||||||
@@ -171,7 +170,7 @@ public class DefaultPluginScanner implements PluginScanner
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
logger.error(
|
logger.error(
|
||||||
"could not read plugin descriptor ".concat(file.getPath()), ex);
|
"could not read plugin descriptor ".concat(file.getPath()), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,11 +188,11 @@ public class DefaultPluginScanner implements PluginScanner
|
|||||||
* @throws JAXBException
|
* @throws JAXBException
|
||||||
*/
|
*/
|
||||||
private void scannFile(Set<PluginInformation> plugins, File file)
|
private void scannFile(Set<PluginInformation> plugins, File file)
|
||||||
throws IOException, JAXBException
|
throws IOException, JAXBException
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("scann file {}", file.getPath());
|
logger.trace("scann file {}", file.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
JarInputStream inputStream = null;
|
JarInputStream inputStream = null;
|
||||||
@@ -217,8 +216,10 @@ public class DefaultPluginScanner implements PluginScanner
|
|||||||
(Plugin) pluginContext.createUnmarshaller().unmarshal(inputStream);
|
(Plugin) pluginContext.createUnmarshaller().unmarshal(inputStream);
|
||||||
|
|
||||||
if ((plugin != null) && (plugin.getInformation() != null)
|
if ((plugin != null) && (plugin.getInformation() != null)
|
||||||
&& plugin.getInformation().isValid())
|
&& plugin.getInformation().isValid())
|
||||||
{
|
{
|
||||||
|
logger.debug("analyze plugin: {}", plugin);
|
||||||
|
|
||||||
PluginCondition condition = plugin.getCondition();
|
PluginCondition condition = plugin.getCondition();
|
||||||
|
|
||||||
if (condition != null)
|
if (condition != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user