I was trying to make php error logs visibly good
whenever I do error_log($ex->getTraceAsString()) but it printed
so I figured out the possibilities, it turned out that I should do that from terminal itself
so I do
tail -f /var/log/apache2/error.log | sed 's/\n/
/g'
But Previously for my logs I used to do
tail -f /var/log/apache2/error.log | grep production
for logs that contains the keyword production
But I want both of them what should I do?.So that my both criteria worked
I tried
tail -f /var/log/apache2/error.log | grep production | sed 's/\n/
/g'
tail -f /var/log/apache2/error.log | sed 's/\n/
/g' | grep production
(tail -f /var/log/apache2/error.log | grep production) | sed 's/\n/
/g'
(tail -f /var/log/apache2/error.log | sed 's/\n/
/g') | grep production
But none of these worked. What should I do?
question from:
https://stackoverflow.com/questions/65923983/using-sed-with-grep-for-the-log-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…