• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Logger - help!

#1
I want to change the format of the filenames for the built in logger. It's not an option in the config and is hardcoded in FileHandler.php.

I've looked at the documentation for creating your own custom logger and I have to admit that I simply cannot understand it.

Given the code is already written in the core functionality and I merely need to change how the filename is constructed, I foolishly thought this would be a straightforward task but even after reading the documentation several times, I don't know where to start. For example, do I create a new file in libraries or helpers, or somewhere else? 

I've also taken alook at the config files it says I need to add to, and again, it is far from obvious quite what I would need to do here. I could just write my own customer helper in the time I've spent trying to figure this out, but I'm trying to do it *the right way*.

Any assistance would be greatly appreciated. I like CodeIgniter 4, but it is in areas like this that I think the documentation sadly comes up short as it makes too many assumptions about what a novice would already know.
Reply

#2
I am working on a logger "add-in" for CI v4 that is designed to be easier to extend than the framework's Logger. It includes some settings to customize the filename to a certain extent.

What I've done breaks compatibility with the current release and so is designed as an add-in module. It's almost ready and I should have a repo up on GitHub soon.
Reply

#3
(03-30-2020, 08:10 AM)dave friend Wrote: I am working on a logger "add-in" for CI v4 that is designed to be easier to extend than the framework's Logger. It includes some settings to customize the filename to a certain extent.

What I've done breaks compatibility with the current release and so is designed as an add-in module. It's almost ready and I should have a repo up on GitHub soon.

That sounds like it would be very useful, thanks.
Reply

#4
(03-30-2020, 08:12 AM)Fido L Dido Wrote: That sounds like it would be very useful, thanks.

I'll post something in the CodeIgniter 4 Addins form when the repo is up.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.