Skip to content

Instantly share code, notes, and snippets.

@P7h P7h/sed_log4j.sh
Last active Oct 26, 2017

Embed
What would you like to do?
Replaces all levels to ERROR in all the log4j.properties files on the disk
sudo find / -type f -name "log4j.properties" -exec sed -i 's/TRACE/ERROR/g' {} +
sudo find / -type f -name "log4j.properties" -exec sed -i 's/DEBUG/ERROR/g' {} +
sudo find / -type f -name "log4j.properties" -exec sed -i 's/INFO/ERROR/g' {} +
sudo find / -type f -name "log4j.properties" -exec sed -i 's/WARN/ERROR/g' {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.