New command line option: --log-file-qualifier=VAR.  When specified,
the contents of environment variable VAR (viz, $VAR) are incorporated
into logfile names.  This makes it easy to incorporate environmental
information into logfile names.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4180 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/pub_core_options.h b/coregrind/pub_core_options.h
index 14faef4..b24ad94 100644
--- a/coregrind/pub_core_options.h
+++ b/coregrind/pub_core_options.h
@@ -71,6 +71,12 @@
    made to hold the relevant file id, by opening clo_log_name
    (concatenated with the process ID) for writing.
 
+   With --log-file, there is an additional twist: if
+   clo_log_file_qualifier is non-NULL, the contents of the environment
+   variable specified by clo_log_file_qualifier is incorporated into
+   the logfile name.  This is useful in that it allows the logfile
+   name to incorporate environmental information.
+
    With --log-socket, clo_log_name holds the hostname:portnumber pair,
    and is taken from the command line.  clo_log_fd is then made to hold
    the relevant file handle, by opening a connection to that
@@ -78,8 +84,9 @@
 
    Global default is to set log_to == VgLogTo_Fd and log_fd == 2
    (stderr). */
-extern Int     VG_(clo_log_fd);
-extern Char*   VG_(clo_log_name);
+extern Int   VG_(clo_log_fd);
+extern Char* VG_(clo_log_name);
+extern Char* VG_(clo_log_file_qualifier);
 
 /* Add timestamps to log messages?  default: NO */
 extern Bool  VG_(clo_time_stamp);