[Cuis-dev] A lot of log messages in Cuis-Smalltalk-Dev dir
Nicola Mingotti
nmingotti at gmail.com
Wed Jul 28 06:28:56 PDT 2021
oh goodness, that goes deep.
I think I understood at least 60% ... I will look better at it in some time.
Now it would bring my thoughts very far, too far.
Strictly speaking it is valueOfFlag that returns false if it dosen't
find stuff.
I should have used preferencesAt: for my little test.
Thank you for your clarification !
bye
Nicola
On 7/28/21 11:57 AM, Gerald Klix wrote:
> Hi Nicola,
>
> that's an easy one. The class side of Preferences contains
> the following method:
>
> logDebuggerStackToFile
> ^ self
> valueOfFlag: #logDebuggerStackToFile
> ifAbsent: [ true ].
>
> That message is sent in Debugger class:
> openContext: aContext label: aString contents: contentsStringOrNil
> "Open a notifier in response to an error, halt, or notify. A
> notifier view just shows a short view of the sender stack and provides
> a menu that lets the user open a full debugger."
>
> <primitive: 19> "Simulation guard"
>
> (self errorRecursion not and: [Preferences
> logDebuggerStackToFile]) ifTrue:
> [Smalltalk logError: aString inContext: aContext to:
> 'CuisDebug'].
> ....... Here follows the actual debugger code .......
>
> and some other debugger class methods.
> I once considered to change these three methods to use 'HaverDebug'
> but refrained from patching three system methods for
> vanity^H^H^H^H^H^Hnaming reasons.
>
> To make things easier and more complicated there also
> exists some DNU logic in Preferences class:
>
> doesNotUnderstand: aMessage
> "Look up the message selector as a flag."
> aMessage arguments size > 0 ifTrue: [^ super doesNotUnderstand:
> aMessage].
> ^ self valueOfFlag: aMessage selector
>
> You also might have noticed this one:
>
> valueOfFlag: aFlagName
> "Answer the value of the given flag"
>
> ^ (self preferenceAt: aFlagName ifAbsent: [^ false]) preferenceValue
>
>
> which defaults to false in conrast to many hard coded
> methods.
>
>
> HTH and Best Regards,
>
> Gerald
>
>
>
>
> On 7/28/21 11:19 AM, Nicola Mingotti via Cuis-dev wrote:
>>
>> Hi Gerald,
>>
>> thank, just an extra question, if run this:
>>
>> Preferences valueOfFlag: #logDebuggerStackToFile. => false
>> Preferences valueOfFlag: #logDebuggerStackToFile ifAbsent: 'none'. =>
>> none
>>
>> 1) The property seems not to exist
>> 2) Why trying to access a non existent property does not raise an
>> error ?
>>
>> bye
>> Nicola
>>
>>
>>
>>
>> On 7/28/21 10:14 AM, Gerald Klix wrote:
>>> Hoi Nicola,
>>>
>>> Admittedly this is sometimes a bit annoying.
>>> I solved this issue with a small script:
>>>
>>> #!/bin/sh
>>> nice 7za a -sdel CuisDebugLogs.7z CuisDebug-20??-*.log
>>>
>>> Basically add the files to 7zip archive and delete them from
>>> the directory in one go. I prefer them to be archived,
>>> because I tend to mess with the system in way that
>>> also breaks the debugger.
>>>
>>> There is also a preference value -- #logDebuggerStackToFile --
>>> to disable this behavior completely.
>>>
>>>
>>> HTH and Best Regards,
>>>
>>> Gerald
>>>
>>>
>>>
>>> On 7/28/21 9:58 AM, Nicola Mingotti via Cuis-dev wrote:
>>>> Hi guys,
>>>>
>>>> as title says, in the Cuis-Smalltalk-Dev dir I have a lot of files
>>>> like:
>>>> CuisDebug-2021-07-18_12.23.01.log
>>>>
>>>> What do i do ? can i nuke them ?
>>>>
>>>> Can i script delete all but the last (e.g.) 5 every time Cuis turns
>>>> on ?
>>>>
>>>> bye
>>>>
>>>> Nicola
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
More information about the Cuis-dev
mailing list