symfony - Symfony2 logging with items best approach -


i have site multiple items, eg. products in shop. want set logger lets me 2 things:

  • log messages related each product. want provide product's id every log message.
  • in admin area view logs single product, not log history.

i construct entity enables me store logs second parameter:

$logger->info("message", $productid); 

then store in database , later select product id.

but have monolog , lots of other logging bundles. there better approach construct own entity storing logs this?

you should think whats gonna database after year have big data of logs , simple database query take lot of time, think logs should written in files, , have said files because should example make log file each day, make more easer extract data. , explore data if want create entity log can , in log files can store theme using json or csv formats


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -