should log messages be more human readable or computer readable?

1.1k Views Asked by At

I can see advantages to both.

human readable

  • quickly solving a problem is easy, because you can easily find out what's going on
  • when you make a computer readable form, you're usally also sticking to a certain schema, this limits you when your application changes

computer readable

  • easier to automatically analyze logs to improve the site.
1

There are 1 best solutions below

0
On BEST ANSWER

Unfortunately, there's no simple answer to this. It will depend on how you expect the log files to be used. If the log files will be used in ways that would really benefit from a human looking at them and a way that would really benefit from a computer reading them, you could make two different log files. Or you could have something that is computer readable and then have a script that can take the computer-readable log file and output something easily human readable when needed.