admin管理员组文章数量:1129089
New to wp-env, which is mostly a fantastic dev tool.
{
"plugins": ["./blinkwellness-mindbody"],
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"WP_DEBUG_DISPLAY": true,
"SCRIPT_DEBUG": true
},
"phpVersion": "8.1",
"mappings": { "profileApp": "./profileApp" },
"env": {
"development": {
"themes": ["./customtheme"]
},
"tests": {
"config": {
"KEY_1": false
},
"port": 3300
}
}
}
However, I am having trouble finding error logs. At the moment developing an Ajax feature, which started returning a 500 error.
When running wp-env logs all
, the result is:
...523db7a-tests-wordpress-1 | 172.21.0.1 - - \
[16/Feb/2023:13:23:27 +0000] "POST /wp-admin/admin-ajax.php \
HTTP/1.1" 500 484 "http://localhost:3300/schedule/" \
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 \
(KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Empty content in /var/log/apache2/error.log
.
Only wordpress debug log I'm finding on the server, /var/www/html/wp-content/debug.log
, which only has some PHP Deprecated
and other warnings in it.
Any suggestions?
UPDATE
Went to another dev approach (Roots/Trellis, virtualbox), which runs Nginx and there indeed the relevant Fatal Error
is listed in /var/log/nginx/debug.log
.
Where it gets thrown is:
if ( WP_DEBUG ) {
throw new \Exception( $err->getMessage() );
}
So, maybe there's a different php log level between wp-env and the Trellis virtualbox configuration.
New to wp-env, which is mostly a fantastic dev tool.
{
"plugins": ["./blinkwellness-mindbody"],
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"WP_DEBUG_DISPLAY": true,
"SCRIPT_DEBUG": true
},
"phpVersion": "8.1",
"mappings": { "profileApp": "./profileApp" },
"env": {
"development": {
"themes": ["./customtheme"]
},
"tests": {
"config": {
"KEY_1": false
},
"port": 3300
}
}
}
However, I am having trouble finding error logs. At the moment developing an Ajax feature, which started returning a 500 error.
When running wp-env logs all
, the result is:
...523db7a-tests-wordpress-1 | 172.21.0.1 - - \
[16/Feb/2023:13:23:27 +0000] "POST /wp-admin/admin-ajax.php \
HTTP/1.1" 500 484 "http://localhost:3300/schedule/" \
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 \
(KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Empty content in /var/log/apache2/error.log
.
Only wordpress debug log I'm finding on the server, /var/www/html/wp-content/debug.log
, which only has some PHP Deprecated
and other warnings in it.
Any suggestions?
UPDATE
Went to another dev approach (Roots/Trellis, virtualbox), which runs Nginx and there indeed the relevant Fatal Error
is listed in /var/log/nginx/debug.log
.
Where it gets thrown is:
if ( WP_DEBUG ) {
throw new \Exception( $err->getMessage() );
}
So, maybe there's a different php log level between wp-env and the Trellis virtualbox configuration.
Share Improve this question edited Feb 16, 2023 at 18:47 MikeiLL asked Feb 16, 2023 at 13:32 MikeiLLMikeiLL 5791 gold badge8 silver badges21 bronze badges1 Answer
Reset to default 1I added:
trigger_error( ini_get('error_log'), E_USER_WARNING );
which showed:
/dev/stderr
Adding to .wp-env.json
:
{
"config": {
"WP_DEBUG_LOG": "/var/www/html/wp-content/debug.log"
},
...
seems to work for me.
Running npx wp-env run cli wp config get WP_DEBUG
should return 1
showing that WP_DEBUG is enabled by default.
本文标签: dockerTrouble Finding Error Logs in wpenv
版权声明:本文标题:docker - Trouble Finding Error Logs in wp-env 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736732961a1950098.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论