hhvm.log.level ignored
Trying to focus on Errors only, but when setting hhvm.log.level = Error (or hhvm.log.level = error) it's just ignored.
Latest nightly on Ubuntu 14.04. hhvm-nightly (2014.05.14~trusty)
This might already be fixed with some in-trunk Ini changes. @ptarjan?
Still seems broken:
[fredemmott@devbig076 ~] hhvm -c test.ini test.php
Warning: Foo in /home/fredemmott/test.php on line 3
Fatal error: Foo in /home/fredemmott/test.php on line 4
[fredemmott@devbig076 ~] cat test.log
cat: test.log: No such file or directory
[fredemmott@devbig076 ~] cat test.ini
hhvm.log.level=error
hhvm.log.use_log_file=true
hhvm.log.file=/home/fredemmott/test.log
[fredemmott@devbig076 ~] cat test.php
<?php
trigger_error('Foo', E_USER_WARNING);
trigger_error('Foo', E_USER_ERROR);
So, sadly hhvm.log.level represents something totally different left over from the HPHPc days. You probably want a error_reporting replacement right?
Well, hhvm.log.runtime_error_reporting_level is close to what you want. Constants are broken in INI files, so if you want only system errors you can do
hhvm.log.runtime_error_reporting_level = 1
or if you want the user errors too like @fredemmott was trying
hhvm.log.runtime_error_reporting_level = 1 | 256
I'm going to go make
error_reporting = 1 | 256
work, so it is a bit less confusing.
Where did you find the reference to hhvm.log.level? It shouldn't be used or recommended.
And I went to make error_reporting work, and it already does!
error_reporting = 1 | 256
should do what you want.
Thanks for clearing it up, @ptarjan ! The default php.ini comes with: ; hhvm specific hhvm.log.level = Warning
That's where I got the info from! Cheers
@ptarjan Unfortunately I could never get this to work. No matter what I set and where HHVM always logs notices and warnings too. :-/
I also have this issue... my error logs are gigantic sometimes if there's too many warnings and notices. I only need errors. What to do?
i've to use ramfs for logging to avoid disk burning due to tons of notices due to this issue
Actually, could you file a separate issue for this? The base issue from this should already have been solved.