Hacker News new | ask | show | jobs
by babuskov 4058 days ago
If you need to grep logs on regular basis, you're doing it wrong.

Store important data in the database so that you can query it efficiently.

Keep logs for random searches when something unexpected happens. I log gigabytes per day, but only grep maybe once-twice a year.

1 comments

Agreed. But if I keep my logs in a database, I may aswell use the database to query my logs, instead of grepping in them.

(And voila, you have binary log storage.)

Separate the data you are sure you need often and only store that in the database. Store everything else in the textual logs.