R
R
Rodion Yurchenko2017-04-20 15:33:13
symfony
Rodion Yurchenko, 2017-04-20 15:33:13

Where to correctly store the functions that should be available in any controller?

Good afternoon
I'm tormenting symfony 3, but she's me
I need to write something like a user action
logger That is - the user logged in - the logger wrote down The user
left = the logger wrote down The user
wrote a comment - the logger made a note again
Such user actions are scattered over several bundles, respectively, the logger should be available everywhere
Question - where and how can I write this logger?
Does it need a separate bundle?
Tell me at least how to google this question or in which direction to dig))

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
BoShurik, 2017-04-20
@aassdds

Question - where and how can I write this logger?
Does it need a separate bundle?

symfony.com/doc/current/best_practices/business-lo...
symfony.com/doc/current/service_container.html

D
Denis Artamonov, 2017-04-20
@ArtamonovDenis

Move this same logger to a separate class with your own methods (functions)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question