Transforming funcion into a class + using monolog see BT#6369
Merge branch '1.9.x' of github.com:chamilo/chamilo-lms into julio6666