I have an application where I want to do extensive logging to a database. I've found two methods, using the EventManager to attach events to specific class methods or registering a factory with the ServiceLocator and extract the log in the controllers and pass it to affected classes.
Which method is the preferred ZF2-style? Is it one of the above or perhaps some other method altogether? Are there any good examples available? Regards, Björn
