Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer to log to a file, not std-err #264

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading