Welcome Guest, Not a member yet? Register   Sign In
Using CI logging from my own library
#4

[eluser]bretticus[/eluser]
log_message() is a function in scope for the entire framework. It is not a method of the current object (your library class.) The reason you can call CI objects via $this under your Controller (can you really call $this->log_message() in your Controller?) is because your controller extends the Controller class. Your library most likely extends nothing (at least nothing with a log_message() method.)

Try changing:

Code:
$this->log_message('info', 'log message');

to just:

Code:
log_message('info', 'log message');


Messages In This Thread
Using CI logging from my own library - by El Forum - 10-08-2010, 01:59 PM
Using CI logging from my own library - by El Forum - 10-08-2010, 02:26 PM
Using CI logging from my own library - by El Forum - 10-08-2010, 04:01 PM
Using CI logging from my own library - by El Forum - 10-08-2010, 08:17 PM
Using CI logging from my own library - by El Forum - 10-09-2010, 12:39 AM
Using CI logging from my own library - by El Forum - 10-09-2010, 11:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB