How to log using log4j to local file system inside a Spark application that runs on YARN?

It looks like you’ll need to append to the JVM arguments used when launching your tasks/jobs. Try editing conf/spark-defaults.conf as described here spark.executor.extraJavaOptions=-Dlog4j.configuration=file:/apps/spark-1.2.0/conf/log4j.properties spark.driver.extraJavaOptions=-Dlog4j.configuration=file:/apps/spark-1.2.0/conf/log4j.properties Alternatively try editing conf/spark-env.sh as described here to add the same JVM argument, although the entries in conf/spark-defaults.conf should work. If you are still not getting any joy, you can explicitly … Read more

Location of GlassFish Server Logs

In general the logs are in /YOUR_GLASSFISH_INSTALL/glassfish/domains/domain1/logs/. In NetBeans go to the “Services” tab open “Servers”, right-click on your Glassfish instance and click “View Domain Server Log”. If this doesn’t work right-click on the Glassfish instance and click “Properties”, you can see the folder with the domains under “Domains folder”. Go to this folder -> … Read more

Logging POST data from $request_body

This solution works like a charm: http { log_format postdata $request_body; server { location = /post.php { access_log /var/log/nginx/postdata.log postdata; fastcgi_pass php_cgi; } } } I think the trick is making nginx believe that you will call a CGI script. Edit 2022-03-15: there is some discussion on where log_format should be set. The documentation clearly … Read more

Best way to log POST data in Apache?

Use Apache’s mod_dumpio. Be careful for obvious reasons. Note that mod_dumpio stops logging binary payloads at the first null character. For example a multipart/form-data upload of a gzip’d file will probably only show the first few bytes with mod_dumpio. Also note that Apache might not mention this module in httpd.conf even when it’s present in … Read more

tech