Error in the log file when using MY_Log for the CI_Log extension

I see the following error that occurs in the entire application log file when it tries to load MY_Log.

ERROR - 03/26/2013 22: 52: 20-> Severity: warning → include_once (application / core / MY_Log.php) [function.include-once]: could not open the stream: there is no such file or directory C: \ dev \ mysite \ application \ config \ config.php 377

My startup file has the following:

$autoload['libraries'] = array('parser', 'session', 'log'); 

The MY_Log class is defined in the application / library / MY _Log.php

 class MY_Log extends CI_Log 

The MY_Parser class, which is located in the / library / MY _Parser.php application, loads normally.

 class MY_Parser extends CI_Parser 

When I debug the bootloader to understand why Parser behaves differently than Log, it looks like it looks in the application / kernel for MY_Log, but searches (and finds) MY_Parser ok in the application / libraries.

I am using CI 2.1.1

Any ideas why this is the difference?

+4
source share
1 answer

When you are EXTEND , in the main library, for example CI_Log , you will not load it. What for? Since CI_Log is automatically loaded by CI Core. CI_Parser (not familiar with this) is not the main library, so it loads with application/libraries .

Just don't include it in your startup array ()

Also, consider upgrading the CI version (if you haven't already) to take advantage of the latest security / fixes.

+1
source

All Articles