Vvv: Error log no longer being logged with 2.2.1/develop

Created on 26 Aug 2018  路  12Comments  路  Source: Varying-Vagrant-Vagrants/VVV


Expected Behavior

When error logging such as error_log( 'test logging' ); I am expecting it to log that statement to the file /vagrant/log/php7.2_errors.log

Current Behavior

Nothing is logged to that file. Note that this was all working prior to updating to 2.2.1.

Steps to Reproduce (for bugs)

Just add error_log('test logging'); to any server side file.

Note

I have also tried the develop branch. Same results. A work around is to useWP_DEBUG_LOG but it is not as convenient.

Thanks!!

bug support

All 12 comments

My understanding is that VVV logs to /var/logs, can you confirm the missing details of your install? Vagrant/VirtualBox versions, provider used, OS, etc? As well as the ability to write to that location from PHP/inside the VM?

Nothing is logged to that file. Note that this was all working prior to updating to 2.2.1.

Which version did you update from, and which version broke it?

Yeah so I am on Vagrant 2.1.2/VB 5.2.18r124319 on Ubuntu/trusty64 on MacOS host. The version that worked for me was VVV 2.1.0. Yes I am able to write to that location from within the VM.

Note: /var/logs maps to /vagrant/log so that the host machine can access it.

This may be resolved in #1636 @roykho does this PR resolve the issue for you?

@tomjn - tested, unfortunately it didn't work for me. I fetched your PR and then re-provisioned but no go.

I use that command on my develop,ent, that log is available inside the website folder in a debug.log folder.
I am using also a bash alias to tail the log of the website I want to debug https://github.com/Mte90/My-Scripts/blob/master/bashrc#L153

I had the same problem @roykho. I believe I solved it by removing php7.2 from utilities and re-provision. php7.2 is no longer needed as a utility since 2.2.1 includes it by default.

I have the same problem with php5.6 though, all logging end up in /vagrant/log/nginx/error.log instead of /vagrant/log/php5.6_errors.log like it should.

I use error_log and I get that error in vvv/www/site/htdocs/wp-content/debug.log

I use error_log and I get that error in vvv/www/site/htdocs/wp-content/debug.log

@Mte90 Well, that should be the case if you use WP_DEBUG. The problem for me and @roykho is that logging without WP_DEBUG ends up in the wrong file.

@circuuz

I believe I solved it by removing php7.2 from utilities and re-provision

Ah I haven't tried that yet. Good find.

@roykho If that doesn't solve it, though it should.
Here you can see my PR with the problem and you can yourself apply the fix.
https://github.com/Varying-Vagrant-Vagrants/vvv-utilities/pull/20

This should be resolved now with the update to the core utilities, so I'm closing this.

I'd also recommend doing a git pull and a reprovision to move to v2.4

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings