Ruby で作った

# . で始まる、隠し directory, file を除く
glob_pattern = "/mnt/c/Users/Owner/Documents/test/**/*.log"

re = /^\||Error/
first_time = true # 最初の1回だけ

Dir.glob( glob_pattern )
.select { |full_path| File.file?( full_path ) } # ファイルのみ
.each do |full_path|
# 末尾の改行を削除して、1行ずつ処理する
File.foreach( full_path, chomp: true ) do |line|
line.match( re ) do |matched| # 一致した行だけ
if first_time # 最初だけ
puts full_path
first_time = false
end
puts line
end
end
first_time = true
end

出力
/mnt/c/Users/Owner/Documents/test/test/test01.log
0501 Error!
|まちがってるよ
|まちがってるよ
/mnt/c/Users/Owner/Documents/test/test02.log
|xx
bb Errorzz