Re: Binary logs?
Travis Paul <Tr@...
2011-10-27 16:30:03 GMT
I do see some errors that are probably making grep think the file is binary
and I pasted them here http://pastebin.com/rA9kHSNF if they are at all of
interest. I am unsure of their meaning.
I encountered a 'bizarre' error that I want to catch, which occurred when I
accessed the _rewrite url to a view and Couch returned a lot of plain text
that looked like a stack trace, which a page refresh corrected and I have
not been able to recreate. I don't recall the date when I encountered that
error or what the error message looked like, so I'm not sure what to look
for in old logs, but I never want a user to see it so I'm trying to catch it
to see if it was something that I did or possibly a bug.
On Thu, Oct 27, 2011 at 12:06 PM, Robert Newson <rnewson@...> wrote:
> Grep has a heuristic to detect text vs. binary by examining the first
> part of the file. I'm curious to know what you have in, say, the first
> 100 bytes.
> couch.log is a text file, my guess is you have some strange characters
> in your log that is fooling grep.
> On 27 October 2011 16:59, Travis Paul <Tr@...> wrote:
> > If I try grep without the -a flag such as: *grep "Thu, 27 Oct 2011"
> > couch.log*
> > I get: *Binary file couch.log matches*
> > tail, and head commands work as usual, but if I want to open the file in
> > gedit I have to do something like: *strings couch.log > couch.log.text*