Index: factory.conf |
diff --git a/factory.conf b/factory.conf |
index 9d9826a7505e207baea6369cc4daab6d1e06ae77..1784cba7034ce635842e0ac1fe9fcdd790a35945 100644 |
--- a/factory.conf |
+++ b/factory.conf |
@@ -20,7 +20,16 @@ script |
else |
OPT="-c" |
fi |
- ./bin/autotest -t factory $OPT control >>/var/log/factory.log 2>&1 |
+ FACTORY_LOG_FILE=/var/log/factory.log |
+ CONSOLE_LOG_FILE=/var/log/factory_console.log |
+ # Factory log will be uploaded so we must always preserve previous results. |
+ # Console log is just for UI to display, no need to be saved across sessions; |
+ # however in order to support writing by multiple processes, the file must be |
+ # opened in "append" mode. So we must first delete it then use >> to append. |
+ rm -f "$CONSOLE_LOG_FILE" |
+ ./bin/autotest -t factory $OPT control 2>&1 | |
+ tee -a "$FACTORY_LOG_FILE" | |
+ grep --line-buffer "FACTORY" >>"$CONSOLE_LOG_FILE" |
jrbarnette
2011/03/30 18:14:40
Are you sure the pattern "FACTORY" is restrictive
Hung-Te
2011/03/31 02:17:10
A sample of the data format:
01:21:28 ERROR| FACTO
|
end script |
pre-stop script |