I am creating a simple Changelog lib in CodeIgniter that will basically log a message everytime someone adds, deletes, changes or publish a blog post. I will log messages in files by batches of 300. So every 301st message will go in a new file. At first I wanted to write the logs to simple .log files but then I got the idea to actually style the thing and I had to seperate each "attribute" of each message (ie: the user, the message, the type of the log, etc.). So .log files are out of the question since extracting the info would be a pain.
What is the most appropriate format for such a task? I already ruled out MySQL and XML because they are too heavy (especially considering that the log files won't exceed (about) 300 lines). I suggested YAML vs JSON vs CSV in the title, but is there yet a better alternative?
I'd say it all depends on what you need/want to do with those files :
If you are in none of these situations :
Then I guess all three formats will be OK ^^
Without knowing more, I would go with either CSV (for the import to Excel stuff), or JSON (for the portability reason).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With