CodeIgniter Forums
Logging library or helper? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Logging library or helper? (/showthread.php?tid=67060)



Logging library or helper? - eagle00789 - 01-10-2017

I want to create a logging function to log actions from my system to a database table, so that i can track what user made what change to the system.
Would i best create a helper or a library for this?
What is best practice for such a case...


RE: Logging library or helper? - Avenirer - 01-11-2017

Hello. I don't know if this helps, but do give a try to my Rat library: https://github.com/avenirer/CodeIgniter-Rat


RE: Logging library or helper? - eagle00789 - 01-11-2017

I'm going to try that library Avenirer. It looks like exactly what i need.


RE: Logging library or helper? - eagle00789 - 01-11-2017

Avenirer, i really love your work with this Rat library. it does exactly what i need. Thanks for this Big Grin


RE: Logging library or helper? - cartalot - 01-11-2017

(01-11-2017, 12:44 AM)Avenirer Wrote: Hello. I don't know if this helps, but do give a try to my Rat library: https://github.com/avenirer/CodeIgniter-Rat

I was going to try this but then on your github page - you say:

"You can either autoload the library (I don't advise you to do that),"


why can't you autoload it? especially if this is something meant for the entire application?


RE: Logging library or helper? - eagle00789 - 01-11-2017

i autoload it even though it is not recommended by the developer and don't see/experience any downsides to doing so.


RE: Logging library or helper? - Narf - 01-11-2017

(01-11-2017, 04:04 PM)eagle00789 Wrote: i autoload it even though it is not recommended by the developer and don't see/experience any downsides to doing so.

If they have to warn yout about it, it's likely because you wouldn't see the problem until it's too late - I'd give that another thought.