1
0
Fork 0
Smalltalk implementation of logging framework ideas
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 

35 lines
708 B

Object subclass: GSTProcessVariableHolder [
| val |
<category: 'OsmoLogging-Pharo'>
value: aValue [
<category: 'set'>
val := val.
]
value [
<category: 'get'>
^ val
]
]
ProcessLocalVariable subclass: GSTProcessVariable [
| dict |
<category: 'OsmoLogging-Pharo'>
GSTProcessVariable class >> key: aKey [
<category: 'creation'>
^ self soleInstance key: aKey.
]
dict [
<category: 'creation'>
^ dict ifNil: [dict := Dictionary new].
]
key: aKey [
<category: 'key'>
^ self dict at: aKey ifAbsent:
[self dict at: aKey put: GSTProcessVariableHolder new].
]
]