Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Logging and monitoring in Wordpress

809 views

Published on

An introduction to how you should log and monitor your Wordpress application, services and servers. It will introduce Monolog, Graylog2/ElasticStack and NewRelic.

Published in: Education
  • Be the first to comment

  • Be the first to like this

Logging and monitoring in Wordpress

  1. 1. Logging & Monitoring Knowing your shit by Tobias Nyholm
  2. 2. Logging Logging?
  3. 3. Logging Composer?
  4. 4. –Johnny Appleseed “Type a quote here.” Tagged version 1
  5. 5. Logging Jordi Boggiano @seldaek
  6. 6. Talk overview
  7. 7. About me • Tobias Nyholm, @tobiasnyholm • Happyr.com • Co-host of Sound of Symfony podcast • Organizer of PHP Stockholm
  8. 8. What do you do today?
  9. 9. Google analytics User statistics What pages visited Time spent on the site How the users moves Where they come from etc…
  10. 10. Comment was created Call to API Media uploaded Plugins activated Data fetched We want to log more
  11. 11. Example logging
  12. 12. Use monolog
  13. 13. Use monolog Log with different levels Use streams No issue with locking Extendable!
  14. 14. Use Wordpress hooks https://codex.wordpress.org/Plugin_API/Action_Reference
  15. 15. Use Activity Log plugin
  16. 16. Log exceptions
  17. 17. Log exceptions
  18. 18. Monolog handlers
  19. 19. Monolog handlers
  20. 20. Recap Application events Exceptions Use Monolog Everything put into one file
  21. 21. We got tons of entries
  22. 22. Log files /var/www/my_site/log.txt /var/log/php5-fpm.log /var/log/php5-fpm/access.log /var/log/php5-fpm/errors.log /var/log/php5-fpm/slow.log /var/log/apache2/access.log /var/log/apache2/error.log /var/log/syslog
  23. 23. I introduce to you: A logging server!
  24. 24. Logging server Graylog 2 Elastic stack (former Elk)
  25. 25. Demo images on graylog
  26. 26. –Johnny Appleseed “Type a quote here.”
  27. 27. I introduce to you: New Relic
  28. 28. –Johnny Appleseed “Type a quote here.”
  29. 29. –Johnny Appleseed “Type a quote here.”
  30. 30. –Johnny Appleseed “Type a quote here.”
  31. 31. Thank you @tobiasnyholm
  32. 32. Seminars Meetup Lightning talks - April 19th http://www.meetup.com/php-stockholm/events/230222917/ NewRelic workshop - May 3rd http://newrelic.com/rsvp/20160503stockholmapmwkshp Meetup with PHP security - May 11th http://www.meetup.com/php-stockholm/events/228580453/

×