Extending Native Libraries or Replacing Native Libraries with Your Versions |
Hi all,
I want to extend the Log library to customize the log format. I have create my own class MY_Log extending CI_Log in application/libraries. When I load this library I have this error: Unable to load the requested class: Log. I have copied the original Log class system/core/Log to application/libraries to replace the native one, but I have the same error. I am using codeigniter 3.0.6 Can somebody help me to solve this issue ?
In the future fyi:
If the Library you are extending is in the: system/core then it goes in application/core system/libraries it goes in application/libraries What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
You do not need to copy the original file when extending a Core class. In fact, you should not do that.
To extend the log library it would look something like this Code: class My_Log extends CI_Log { |
Welcome Guest, Not a member yet? Register Sign In |