0

Tried to implement Monolog into a CodeIgniter 3 base installation, and implemented as per the instructions here: https://github.com/stevethomas/codeigniter-monolog, but for some reason CI 3 does not replace the built-in system CI_Log library. I have done the following:

  1. Installed Monolog via Composer.
  2. Copied monolog.php and Log.php as per instructions to config and libraries respectively.
  3. Added the Composer autoload instruction to my CI index.php file; the autoloader is being called, but the library is not initialized.

Expected result: Use Monolog instead of native CI logging. Result observed: CI used built in CI logging.

What am I missing?

Kobus Myburgh
  • 1,114
  • 1
  • 17
  • 46

1 Answers1

2

See http://www.codeigniter.com/user_guide/general/core_classes.html#replacing-core-classes You must put it in application/core directory.

And about Composer autoloader. CI 3 has its config $config['composer_autoload']. See http://www.codeigniter.com/user_guide/general/autoloader.html

kenjis
  • 664
  • 3
  • 7
  • Thank you - I have used your answer to make it work. It is different from what the author instructions for those libraries are, but hey, it works, and it is the right way... :-) – Kobus Myburgh Jul 20 '15 at 21:16