An application I\'m working on requires logging of actions, user who performs the action, and time of action to a database.
Which design pattern is most popular/appropri
Observer Pattern is well suited for logging framework. You can have Logger class extending Observable, and child classes like log to console, log to Database and log to File system etc and each child class implements Observer. Now whenever a log message is logged all the observer classes registered with Logger class will be notified so that each Child class ex: log to console will log the message to console. Also Logger class can follow Singleton pattern to make sure a single instance of Logger is available through out application.