One of my java projects I use logback with a mongodb appender. This allows me to structure the logs for easy querying plus I have access to all stacktraces from all servers in one spot.
If you go this route, use a capped collection. I generally don't care about my old logs anyway.
If you go this route, use a capped collection. I generally don't care about my old logs anyway.