![]() |
Hi, I try to write a log message like this:
PHP Code: public function test() When I access that route I fine test message but I see no log. It doesn't over the threshold since I clear the log folder already. I can see an error log if my code got some error but not when I try to trigger using this code. Thanks.
Make sure the writable folder is really writable and your log threshold is set to 4 or higher.
See https://codeigniter.com/user_guide/general/logging.html and https://github.com/codeigniter4/CodeIgni...Logger.php
I did already, I set it to 10 and it currently has 3 logs already, so I assume it's already writeable right? I'm really confused, I already read the docs and it said I just write log_message('error', 'Some variable was correctly set'); or did I miss something?
Never mind, when I take a look at common.php it said environment must be 'testing', I think you guys suppose to put that on documentation so a newcomer doesn't have to get into this trouble.
(06-19-2022, 11:05 AM)Eko Wrote: Never mind, when I take a look at common.php it said environment must be 'testing', I think you guys suppose to put that on documentation so a newcomer doesn't have to get into this trouble. What do you mean? (06-18-2022, 07:21 AM)Eko Wrote: I did already, I set it to 10 and it currently has 3 logs already, so I assume it's already writeable right? There is no `10`. The max number is `9`. See https://github.com/codeigniter4/CodeIgni...hp#L19-L30 |
Welcome Guest, Not a member yet? Register Sign In |