how to Pipe Magento2 logs to STDOUT? - magento2

How to store/write the logs inside STD-OUT instead of var/log folder in Magento2 root?
Is it possible to store the logs directly to syslog instead of var/log?

Related

How to set up catalina.out log files on jasperserver for multiple instances?

I have jasperserver with two instances. And in both instances here /var/log/tomcat9_first_instance, /var/log/tomcat9_second_instance I have catalina.out log file. But I did not get there logs from my instances, instead all logs go to /var/log/tomcat9/catalina.out.
I want log from first instance in /var/log/tomcat9_first_instance/catalina.out and from second instance in /var/log/tomcat9_second_instance/catalina.out. How to fix this? 

databricks | enable to ship file system logs to DBFS or storage. ???`

I have created an init script that helps me in getting custom logs in databricks , By default log get created at local (Driver/ worker machine ) path log/log4j-active.log but how can I enable to ship it to DBFS or storage. ???`
%sh
ls logs
getting below output
lineage.json
log4j-active.log
log4j-mylog4j-active.log
metrics.json
product.json
stderr
stdout
ttyd_logs
usage.json
i want to copy my log file log4j-mylog4j-active.log to dbfs or blob storage anything would work ..
dbutils.fs.cp("logs/log4j-mylog4j-active.log", "dbfs:/cluster-logs/")
I am also trying filesystem copy but can't do
FileNotFoundException: /logs/log4j-active.log
I have also tried to create a folder and specify the path in the logging ( in cluster advance option)
but that also didn't work , i don't know why my fs logs are not getting ship to that location of dbfs.
can i get help that how can I transfer my fs log to dbfs or storage ??
thanks in advance !!
You just need to enable logging in your cluster configuration (unfold "Advanced options") & specify where logs should go - by default it's a dbfs:/cluster-logs/ (and cluster ID will be appended to it), but you can specify another path.

td-agent does not validate google cloud service account credentials

Trying to configure fluentd output with td-agent and the fluent-google-cloud plugin. The plugin and all dependencies are loaded but fluentd is not outputting to google cloud logging and the td-agent log states error="Unable to read the credential file specified by GOOGLE_APPLICATION_CREDENTIALS: file /home/$(whoami)/.config/gcloud/service_account_credentials.json does not exist".
However when I go to the file path, the file does exist and the $GOOGLE_APPLICATION_CREDENTIALS variable is set to the file path as well.What should I do to fix this?
On the assumption that the error and you are both correct, I suspect (!) that you're using your user account ( == whoami) and finding /home/$(whoami)/.config/gcloud while the agent is running (under systemctl?) as root and not finding the credentials file there (perhaps /root/.config/gcloud.
It would be helpful if you included more details as to what you've done in order that we can better understand the issue.

Custom file location for Log4j : logs not getting created

I am trying to implement custom app logs by creating log4j.properties file with a custom file location as below. File is kept at
scr/main/recources
log4j.appender.FILE.File=/home/ec2-user/Log/Scanlog.out
I can't find logs created on this location on linux server from where I am running code. I have given full permission to path and spark-summit is through ec2-user only.
I have tried with log4j.appender.FILE.File=C:/user/PI/Log/Scanlog.out
and it works fine in local, but on linux server.

Capistrano 3 move log directory

how can I change the directory where capistrano puts its log files? I could not find in the docs.
Currently the logs appear in myapp/log/... on my dev machine. However, since I am using laravel, and there is a log directory myapp/storage/logs I would like capistranos logs to appear here as well.
Do you mean the capistrano.log file that is created and appended to whenever you deploy?
You can specify the location by adding the following to deploy.rb:
set :format_options, log_file: "storage/logs/capistrano.log"
This tells Airbrussh (the default logging implementation in Capistrano 3.5.0+) where to place the log file. More information here: https://github.com/mattbrictson/airbrussh#configuration