# Log4j2.properties scripts and JavaScript error version \> 8.0

**URL:** <https://discuss.elastic.co/t/log4j2-properties-scripts-and-javascript-error-version-8-0/304054>\
**Category:** Logstash\
**Created:** [May 5, 2022, 3:49pm UTC](https://discuss.elastic.co/t/log4j2-properties-scripts-and-javascript-error-version-8-0/304054 "2022-05-05T15:49:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yustas](https://avatars.discourse-cdn.com/v4/letter/y/a8b319/32.png) [@Yustas](https://discuss.elastic.co/u/Yustas)\
**Post date:** [May 5, 2022, 3:49pm UTC](https://discuss.elastic.co/t/log4j2-properties-scripts-and-javascript-error-version-8-0/304054/1 "2022-05-05T15:49:15Z")

</div>

From version 8.0.0 JavaScript in log4j2.properties rise error.

> <https://github.com/elastic/logstash/blob/8.0/logstash-core/lib/logstash/runner.rb#L447>

So i tryed find any script to filter logs with enabled pipeline splitting (pipeline.separate\_logs: true), but dont found any replacement for code (worked before version 8.0.0):

```auto
appender.json_rolling.avoid_pipelined_filter.type = ScriptFilter
appender.json_rolling.avoid_pipelined_filter.script.type = Script
appender.json_rolling.avoid_pipelined_filter.script.name = filter_no_pipelined
appender.json_rolling.avoid_pipelined_filter.script.language = JavaScript
appender.json_rolling.avoid_pipelined_filter.script.scriptText = ${sys:ls.pipeline.separate_logs} == false || !(logEvent.getContextData().containsKey("pipeline.id"))

appender.routing.routes.script.type = Script
appender.routing.routes.script.name = routing_script
appender.routing.routes.script.language = JavaScript
appender.routing.routes.script.scriptText = logEvent.getContextData().containsKey("pipeline.id") ? logEvent.getContextData().getValue("pipeline.id") : "sink";

```

Did anybody knows how i can replace script to separate pipelines in logstash without JavaScript?

---

<div class="post-metadata">

**Author:** ![Yustas](https://avatars.discourse-cdn.com/v4/letter/y/a8b319/32.png) [@Yustas](https://discuss.elastic.co/u/Yustas)\
**Post date:** [May 23, 2022, 8:02am UTC](https://discuss.elastic.co/t/log4j2-properties-scripts-and-javascript-error-version-8-0/304054/2 "2022-05-23T08:02:09Z")

</div>

Has anyone encountered a similar problem?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 20, 2022, 8:02am UTC](https://discuss.elastic.co/t/log4j2-properties-scripts-and-javascript-error-version-8-0/304054/3 "2022-06-20T08:02:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
