Summary: | SMTPAppender will not run within sandbox | ||
---|---|---|---|
Product: | Log4j - Now in Jira | Reporter: | s.podkowinski |
Component: | Appender | Assignee: | log4j-dev <log4j-dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 1.2 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Modified fix committed in rev 439032 (trunk) and 439033 (1.2 branch). |
Please consider the following patch to make the Appender work in a restricted sandbox environment. 84,87c84,92 < Properties props = new Properties (System.getProperties()); < if (smtpHost != null) < props.put("mail.smtp.host", smtpHost); < --- > Properties props = null; > try { > props = new Properties (System.getProperties()); > if (smtpHost != null) > props.put("mail.smtp.host", smtpHost); > } catch(SecurityException se) { > props = new Properties(); > props.put("mail.smtp.host", smtpHost); > }