summaryrefslogtreecommitdiff
path: root/indra/llcommon/llprocess.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-02-20 14:22:32 -0500
committerNat Goodspeed <nat@lindenlab.com>2012-02-20 14:22:32 -0500
commit999484a60896b11df1af9a44e58ccae6fa6ecbed (patch)
tree7dc5662cf6957bbb677191c23f701bc3947c2ca2 /indra/llcommon/llprocess.h
parent8b5d5f9652499103b966524e1c0ceef869e29eeb (diff)
Let LLProcess consumer specify desired description for logging.
If caller runs (e.g.) a Python script, it's not very helpful to a human log reader to keep seeing LLProcess instances logged as /pathname/to/python (pid). If caller is aware, the code can at least use the script name as the desc -- or maybe even a hint as to the script's purpose. If caller doesn't explicitly pass a desc, at least shorten to just the basename of the executable.
Diffstat (limited to 'indra/llcommon/llprocess.h')
-rw-r--r--indra/llcommon/llprocess.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llcommon/llprocess.h b/indra/llcommon/llprocess.h
index 96a3dce5b3..d005847e18 100644
--- a/indra/llcommon/llprocess.h
+++ b/indra/llcommon/llprocess.h
@@ -159,7 +159,8 @@ public:
cwd("cwd"),
autokill("autokill", true),
files("files"),
- postend("postend")
+ postend("postend"),
+ desc("desc")
{}
/// pathname of executable
@@ -199,6 +200,13 @@ public:
* with code 0")
*/
Optional<std::string> postend;
+ /**
+ * Description of child process for logging purposes. It need not be
+ * unique; the logged description string will contain the PID as well.
+ * If this is omitted, a description will be derived from the
+ * executable name.
+ */
+ Optional<std::string> desc;
};
typedef LLSDParamAdapter<Params> LLSDOrParams;