Skip to content

Commit

Permalink
Comment lo4j2 script in order to save resources in pulsar-admin (apac…
Browse files Browse the repository at this point in the history
…he#9309)

Our default configuration file for log4j includes and example about how to use Javascript based filters.

Enabling that lo4j feature forces log4j runtime to perform Nashorn JS engine initialisation, this basically slows down pulsar-admin startup.

When you run on JDK11+ you also see a warning "Warning: Nashorn engine is planned to be removed from a future JDK release" that is very annoying for users. 

This change is part of a little series of patches about improving pulsar-admin startup speed
  • Loading branch information
eolivelli authored Jan 27, 2021
1 parent 25dbc94 commit 2dc2470
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions conf/log4j2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ Configuration:
value: "Console"

# Example: logger-filter script
Scripts:
ScriptFile:
name: filter.js
language: JavaScript
path: ./conf/log4j2-scripts/filter.js
charset: UTF-8
# Scripts:
# ScriptFile:
# name: filter.js
# language: JavaScript
# path: ./conf/log4j2-scripts/filter.js
# charset: UTF-8

Appenders:

Expand Down

0 comments on commit 2dc2470

Please sign in to comment.