aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-03-27 19:01:21 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-03-27 19:01:21 -0400
commitb7bf464a53a3736a410a1d6a191e8980137e0657 (patch)
tree1bcbca5b28b3f7378d4e9478597f0f4c0705f8cd /src
parentopenbox fix (diff)
downloadfirejail-b7bf464a53a3736a410a1d6a191e8980137e0657.tar.gz
firejail-b7bf464a53a3736a410a1d6a191e8980137e0657.tar.zst
firejail-b7bf464a53a3736a410a1d6a191e8980137e0657.zip
send stderr to logfile using --output
Diffstat (limited to 'src')
-rw-r--r--src/firejail/output.c4
-rw-r--r--src/firejail/usage.c4
-rw-r--r--src/man/firejail.txt2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/firejail/output.c b/src/firejail/output.c
index a554b76aa..269ac25ea 100644
--- a/src/firejail/output.c
+++ b/src/firejail/output.c
@@ -76,7 +76,7 @@ void check_output(int argc, char **argv) {
76 for (i = 0; i < argc; i++) { 76 for (i = 0; i < argc; i++) {
77 len += strlen(argv[i]) + 1; // + ' ' 77 len += strlen(argv[i]) + 1; // + ' '
78 } 78 }
79 len += 50 + strlen(outfile); // tee command 79 len += 100 + strlen(LIBDIR) + strlen(outfile); // tee command
80 80
81 char *cmd = malloc(len + 1); // + '\0' 81 char *cmd = malloc(len + 1); // + '\0'
82 if (!cmd) 82 if (!cmd)
@@ -88,7 +88,7 @@ void check_output(int argc, char **argv) {
88 continue; 88 continue;
89 ptr += sprintf(ptr, "%s ", argv[i]); 89 ptr += sprintf(ptr, "%s ", argv[i]);
90 } 90 }
91 sprintf(ptr, "| %s/firejail/ftee %s", LIBDIR, outfile); 91 sprintf(ptr, "2>&1 | %s/firejail/ftee %s", LIBDIR, outfile);
92 92
93 // run command 93 // run command
94 char *a[4]; 94 char *a[4];
diff --git a/src/firejail/usage.c b/src/firejail/usage.c
index da5fd4e2f..597005128 100644
--- a/src/firejail/usage.c
+++ b/src/firejail/usage.c
@@ -157,8 +157,8 @@ void usage(void) {
157#endif 157#endif
158 printf(" --nosound - disable sound system.\n\n"); 158 printf(" --nosound - disable sound system.\n\n");
159 159
160 printf(" --output=logfile - stdout logging and log rotation. Copy stdout to\n"); 160 printf(" --output=logfile - stdout logging and log rotation. Copy stdout and stderr\n");
161 printf("\tlogfile, and keep the size of the file under 500KB using log\n"); 161 printf("\tto logfile, and keep the size of the file under 500KB using log\n");
162 printf("\trotation. Five files with prefixes .1 to .5 are used in\n"); 162 printf("\trotation. Five files with prefixes .1 to .5 are used in\n");
163 printf("\trotation.\n\n"); 163 printf("\trotation.\n\n");
164 164
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index 806a68c3c..6eb7c3ff7 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -892,7 +892,7 @@ $ firejail \-\-nosound firefox
892 892
893.TP 893.TP
894\fB\-\-output=logfile 894\fB\-\-output=logfile
895stdout logging and log rotation. Copy stdout to logfile, and keep the size of the file under 500KB using log 895stdout logging and log rotation. Copy stdout and stderr to logfile, and keep the size of the file under 500KB using log
896rotation. Five files with prefixes .1 to .5 are used in rotation. 896rotation. Five files with prefixes .1 to .5 are used in rotation.
897.br 897.br
898 898