Skip to content

Commit

Permalink
Prefer to log to a file, not std-err
Browse files Browse the repository at this point in the history
  • Loading branch information
guusdk committed Sep 19, 2024
1 parent 748d0b5 commit f3af3f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ public static List<PluginManager.Metadata> getPlugins( File pluginDir ) throws I
}
catch ( IOException | DocumentException e )
{
e.printStackTrace();
Log.warn("Unable to load metadata from '{}'", mavenFile, e);
}
return null;
} )
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jivesoftware/site/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private static Set<Metadata> getPlugins( Path path ) throws IOException
}
catch ( IOException | DocumentException e )
{
e.printStackTrace();
Log.warn("Unable to read metadata from '{}'", mavenFile, e);
}
return null;
} )
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/projects/openfire/plugin-archive.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<%@ page import="java.util.jar.JarFile" %>
<%@ page import="org.jsoup.Jsoup" %>
<%@ page import="org.jsoup.safety.Safelist" %>
<%@ page import="org.slf4j.LoggerFactory" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://igniterealtime.org/website/tags" prefix="ir" %>
<%
Expand Down Expand Up @@ -56,7 +57,7 @@
request.setAttribute("cleanHtml", cleanHtml);
} catch (Exception e) {
// This should not prevent the rest of the page from displaying.
e.printStackTrace();
LoggerFactory.getLogger("plugin-archive.jsp").warn("Unexpected exception while processing readme of {}", latestPluginMetadata.mavenFile, e);
}
}
}
Expand Down

0 comments on commit f3af3f4

Please sign in to comment.