Questions tagged [stderr]

45 questions
255
votes
6 answers

How to see stdout of ansible commands?

How do I see stdout for ansible-playbook commands? -v only shows ansible output, not the individual commands. It would be great if I could figure out how to do this immediately, so if something fails or hangs I can see why. e.g. - name: print to…
QuinnBaetz
  • 2,659
  • 2
  • 12
  • 3
164
votes
11 answers

bash: print stderr in red color

Is there a way to make bash display stderr messages in red color?
kolypto
  • 11,058
  • 12
  • 54
  • 66
28
votes
4 answers

How to pipe stderr without piping stdout

How do I pipe the standard error stream without piping the standard out stream? I know this command works, but it also writes the standard out. Command 2>&1 | tee -a $LOG How do I get just the standard error? Note: What I want out of this is to…
C. Ross
  • 3,075
  • 9
  • 35
  • 36
21
votes
2 answers

tar: kill the error message: 'tar: Removing leading `/' from member names'

I run this from a cronjob: tar -czvf /var/backups/svn.tgz /var/svn/* That generates this on stderr: tar: Removing leading `/' from member names I would like to avoid this because it is not a real error (for me!). I want on stderr only things that…
Dan
  • 369
  • 1
  • 5
  • 16
15
votes
4 answers

How can I capture output from LFTP? (Output not written to STDOUT or STDERR?)

I would like get access to progress information from lftp. Currently, I'm using curl like so: curl http://example.com/file -o file -L 2> download.log This writes curl's progress information to the download.log file, which I can tail to get…
jondahl
  • 153
  • 1
  • 1
  • 4
11
votes
4 answers

Is there anyway to get msiexec to echo to stdout instead of logging to a file

As part of a continuous delivery pipeline I'd like to install an msi on a given machine. msiexec plus psexec does this perfectly, but it seems that msiexec can only log to a file and I need it to log to stdout/stderr. Right now, to get the output…
mrmrcoleman
  • 111
  • 1
  • 4
11
votes
2 answers

Completely silent robocopy

I'm trying to robocopy some files silently. Right now, I have robocopy putting everything into a log file, which is fine, but after it finished, Log File: C:\ is printed. My command looks like this: robocopy source destination…
CoV
  • 111
  • 1
  • 1
  • 4
8
votes
4 answers

Should a foreground program invoked by a daemon split logging between stderr and stdout based on severity levels?

Usually log messages are written to stderr. I'm wondering if it is a good idea/practice to split log messages so that errors and warnings go to stderr while debug/informational/notice messages go to stdout instead? Or is this irrelevant given that…
Rio
  • 335
  • 2
  • 11
7
votes
2 answers

Start Sinatra app in the background with stdout and stderr redirected (append) to a file

I have a Sinatra app which I run on my local machine using ruby app.rb. While deploying it on a remote machine via ssh, how do I run it in background and redirect stdout and stderr to a log file? On a restart, I want to preserve the previous logs so…
letronje
  • 429
  • 1
  • 6
  • 17
5
votes
1 answer

nginx logs php-fpm's stderr output cut off at seemingly random positions

Ever since I started using a PHP library that produces a long call chain it's been increasingly difficult to debug issues caused by it because my error logs end up containing output like this: (some values have been blanked out using *) 2017/08/23…
SeinopSys
  • 532
  • 2
  • 6
  • 19
5
votes
2 answers

What is the meaning of the "/dev/null 2>&1" in a Cronjob entry?

Can someone explain to me what is the meaning of "2>&1" doing here in the below cron job 0 23 * * * wget -q -O /dev/null "https://example.com/index.php" > /dev/null 2>&1
mahen3d
  • 4,342
  • 14
  • 36
  • 57
4
votes
1 answer

On Apache2/mod_perl2, stderr output doesn't go to logfile nominated by ErrorLog

I like to maintain separate Apache2 logfiles for each of my named virtual hosts, like this: ServerName myhost.example.com ErrorLog /var/log/apache2/myhost-error.log The nominated file correctly gathers…
3
votes
1 answer

tail /dev/stderr from errors within supervisord php cli script

To make this simple, I want to know if it's possible to access the STDERR like a channel. I don't want the data to log to a file and then tail the file because the amount of information that I want to send in would fill the system. I only care about…
3
votes
2 answers

logging/capturing STDERR/STDOUT on Amazon EC2

I'm looking for a solution that would allow me to automatically capture the STDOUT/STDERR of a process running on Amazon EC2, and send it (remotely) to another server. Sound simple, except: I will be using spot-instances, which means I don't…
3
votes
1 answer

SNMP error reporting to stdout

Why does net-snmp after "No Such Object available on this agent at this OID" errors exit with 0 and print the error message to STDOUT while other errors are printed to STDERR and have an exit status 1? Compare: $ /usr/bin/snmpget -Oqv -v2c -cpublic…
user3040975
  • 131
  • 2
1
2 3