Find all files ending with .log in the current directory and its subdirectories, and then search for lines containing a pattern of alphanumeric characters and underscores enclosed in square brackets, and list the names of the files that contain the pattern.
find ~ -name '*.log' | xargs grep -lP '\[[A-z0-9_]*\]'