I am thinking of using Redis for web application logging purposes. I googled that there are people using this approach by dumping the logs into a Redis queue/list, and then a scheduled worker to write to disk.
http://nosql.mypopescu.com/post/8652869828/another-redis-use-case-centralized-logging
I wish to seek understanding that why not directly use Redis to persist to disk? If I have allocated a small server which Redis will write to, separated from the database, app server, is it feasible to use Redis to persist the logs directly?
I also need help in querying Redis by datetime, user, etc. For example, each log is as follow.
datetime=>2012-03-24 17:45:12
userid=>123
message=>test message
category=>my category
How can I query for results within a datetime range, by a specific user, of a particular category?
Thanks!