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

You may have many different loggers, and different loggers for different parts of an app. For example, you don't want to log certain database or password related stuff explicitly as it creates a security issues.

Also it's a lot easier to test logging, or anything that you would us a global object for, if it's DI based. That said, you can always pass a config object that holds what would normally be global variables but allows you to override.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: