--- a/MiniLogger.st Mon Apr 03 12:38:42 2017 +0200
+++ b/MiniLogger.st Mon Apr 03 12:42:17 2017 +0200
@@ -1091,19 +1091,28 @@
!
expand:message addingInfoFrom:aContext to:aDictionary
- message isString ifFalse:[^ message asString].
+ |messageString mthd rcvr methodWho|
+
+ (messageString := message) isString ifFalse:[
+ messageString := message value asString.
+ messageString isString ifFalse:[ ^ messageString asString].
+ ].
+
+ mthd := aContext method.
+ rcvr := aContext receiver.
+ methodWho := mthd whoString.
aDictionary at:'LINE' put:(aContext lineNumber).
- aDictionary at:'RECEIVER' put:(aContext receiver printString).
- aDictionary at:'CLASS' put:(aContext receiver class).
- aDictionary at:'MCLASS' put:(aContext method mclass).
- aDictionary at:'SELECTOR' put:(aContext method selector).
- aDictionary at:'WHO' put:(aContext method whoString).
- aDictionary at:'WHERE' put:(aContext method whoString,'@',aContext lineNumber printString).
- ^ message expandPlaceholdersWith:aDictionary
+ aDictionary at:'RECEIVER' put:(rcvr printString).
+ aDictionary at:'CLASS' put:(rcvr class).
+ aDictionary at:'MCLASS' put:(mthd mclass).
+ aDictionary at:'SELECTOR' put:(mthd selector).
+ aDictionary at:'WHO' put:methodWho.
+ aDictionary at:'WHERE' put:(methodWho,'@',aContext lineNumber printString).
+ ^ messageString expandPlaceholdersWith:aDictionary
"Created: / 13-03-2017 / 15:46:52 / cg"
- "Modified: / 03-04-2017 / 12:38:25 / cg"
+ "Modified: / 03-04-2017 / 12:42:02 / cg"
!
expand:message with:arg1