Add support to the client logging config for optionally reading a log file
prefix from the global config, and change the autotest.py execution code to
make use of this to produce client.0.*, client.1.*, etc log files instead of
just capturing one set of client.* logs.
Also modifies the server-side logging to capture client.N.log files instead
of client.log.N files (to be more in line with the logs from the client) and
retains the file only if the equivalent client.N.DEBUG file cannot be captured
(e.g. in the case of a complete client crash).
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4285 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/client_logging_config.py b/client/bin/client_logging_config.py
index 2a48480..a59b078 100644
--- a/client/bin/client_logging_config.py
+++ b/client/bin/client_logging_config.py
@@ -1,11 +1,13 @@
import common
import logging, os
-from autotest_lib.client.common_lib import logging_config
+from autotest_lib.client.common_lib import logging_config, global_config
class ClientLoggingConfig(logging_config.LoggingConfig):
def add_debug_file_handlers(self, log_dir, log_name=None):
if not log_name:
- log_name = 'client'
+ log_name = global_config.global_config.get_config_value(
+ 'CLIENT', 'default_logging_name',
+ type=str, default='client')
self._add_file_handlers_for_all_levels(log_dir, log_name)