On design patterns: When should I use the singleton?
class Singleton
{
private static Singleton instance;
private Singleton() {}
In my project we created a logger component which is getting used for logging in the application to different sources (e.g. text file, XML, and database, based on configurations). So there is a log manager which creates the only one instance of the logger class across the application for logging the message, errors, etc.