Skip to content

Commit

Permalink
LOG4J2-3190 Fix ScriptAppenderSelector docs using removed importPacka…
Browse files Browse the repository at this point in the history
…ge() in Nashorn. (#602)

Submitted by: Charlie Hubbard <[email protected]>
  • Loading branch information
chubbard authored Nov 24, 2021
1 parent 49c005c commit df0b5a1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/site/xdoc/manual/appenders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4463,8 +4463,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity {
<Appenders>
<Routing name="Routing">
<Script name="RoutingInit" language="JavaScript"><![CDATA[
importPackage(java.lang);
System.getProperty("os.name").search("Windows") > -1 ? "ServiceWindows" : "ServiceOther";]]]]><![CDATA[>
java.lang.System.getProperty("os.name").search("Windows") > -1 ? "ServiceWindows" : "ServiceOther";]]]]><![CDATA[>
</Script>
<Routes>
<Route key="ServiceOther">
Expand Down Expand Up @@ -4780,8 +4779,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity {
<Appenders>
<ScriptAppenderSelector name="SelectIt">
<Script language="JavaScript"><![CDATA[
importPackage(java.lang);
System.getProperty("os.name").search("Windows") > -1 ? "MyCustomWindowsAppender" : "MySyslogAppender";]]]]><![CDATA[>
java.lang.System.getProperty("os.name").search("Windows") > -1 ? "MyCustomWindowsAppender" : "MySyslogAppender";]]]]><![CDATA[>
</Script>
<AppenderSet>
<MyCustomWindowsAppender name="MyAppender" ... />
Expand Down

0 comments on commit df0b5a1

Please sign in to comment.