-
-
Save iqbmo04/de870f8023b3a83797aefcefd3b0d44d to your computer and use it in GitHub Desktop.
find log4j usages within your java applications. Requires installed JRE and jdeps.
This file contains hidden or 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) | |
| [ ! -z "$LOG4JUSAGE" ] | |
| 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