Hacker News new | past | comments | ask | show | jobs | submit login

site seems down, but off the top of my head

log rotation

log aggregation

log errors/exceptions at the error level, and nothing else

make judicious use of trace, info, debug, etc. levels

properly namespace loggers so that the log level can be set appropriately depending on the environment and current needs

get the fundamentals right - if you are logging an exception, do you actually pass the exception to the logger? Same goes for things like failed API calls. Don't just log "API call failed". Log the entire response including status code and messages.




Its missing a part about high frequency logging.

Something like "log level checks should take only a single clock cycle"

Looks more like a dev env best practices or apps with low traffic best practices


Would you be able to give (link to) information about best practises for high-traffic apps?



I was talking from experience. Dont really follow any guidelines available online.


Don't forget to sanitize those API requests, else you will be like Facebook and can be logging passwords :)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: