1

I'm starting a node process with the following upstart script, logging stdout & stderr into separate files:

script
  sudo -u node /usr/local/bin/node /var/node/services/someServer.js 1> /var/log/node/someServer.log 2> /var/log/node/someServer.error.log
end script

The problem is that both log files have binary data in the head. I can't use less or more to quickly check those logs, which is terribly annoying. Any ideas how I can prevent that process logging binary data?

Gerhard
  • 107
  • 2
  • 8

1 Answers1

1

Try opening using less with the -f and -R options. -f will force open binary files and -R will better handle control characters, if they exist. Does cat display the contents ok?

Christopher Neylan
  • 8,018
  • 3
  • 38
  • 51