aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-09-08 23:38:42 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-09-08 23:38:42 +0800
commit7da7dfdea0d8a3bf927023b4b2a66335c64a6fa6 (patch)
tree30b695c0879c4043dc4913c3dff9829e30d842f7
parent3bdc3fd4b754a523e804955756a242ce3b9d85b9 (diff)
LogManager: Add per process variables for the context
E.g. to add the current imsi use: self logManager context: 'imsi' value: IMSI
-rw-r--r--LogManager.st12
1 files changed, 12 insertions, 0 deletions
diff --git a/LogManager.st b/LogManager.st
index 503884e..bf8277a 100644
--- a/LogManager.st
+++ b/LogManager.st
@@ -241,4 +241,16 @@ Object subclass: LogManager [
target print: anEntry
]
]
+
+ context: aString value: aValue [
+ | key |
+ key := Array with: 'LogArea' with: aString.
+ (ProcessVariable key: key) value: aValue.
+ ]
+
+ contextValue: aString [
+ | key |
+ key := Array with: 'LogArea' with: aString.
+ ^ (ProcessVariable key: key) value.
+ ]
]