Last active
December 12, 2021 14:00
-
-
Save AndreBaumeier/2071de84ebaddb25770c6c6d5473a887 to your computer and use it in GitHub Desktop.
find log4j usages within your java applications. Requires installed JRE and jdeps.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -type f -name '*jar' | while read line; do | |
LOG4JUSAGE='' | |
#echo "Processing file '$line'" | |
LOG4JUSAGE=$(jdeps "$line"|grep -i log4) | |
if [ ! -z "$LOG4JUSAGE" ] | |
then | |
echo "Processing file '$line'" | |
echo "found log4 references" | |
echo "$LOG4JUSAGE" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment