Hi all,

I am currently 'porting' (redoing) the OpenBSC/Osmocom logging framework in
Smalltalk and while developing I see that I have one question/issue with
updating the code.

I have a LogArea which is a three tuple of (description, enabled, minLevel), I
have a LogConfig that holds a list of areas and gives them local names.

So I have something like:

Object subclass: LogConfig [
        Config := LogConfig new.

        LogConfig class >> default [
                ^ Config
        ]

        addArea: anArea name: aName [
                addInstanceVariableAndSetIt
                GenerateGetMethod...
        ]
]

and in another Package/Namespace I would do..

log.LogConfig defaut addArea: localArea: #localName..


Now I have two issues:
        1.) 1 to 3: [SomeClass class addInstVarName: #boo], will add #boo
            three. Is that a bug? That should not be possible, bad things
            will happen as a result..
        2.) FileStream fileIn: 'Log.st'. will set Config back to a new
            instance of LogConfig and all added areas are gone. What are the
            workarounds? Put Config into the Smalltalk dict? Use Notifications
            so people can add their areas again?

thanks for the help

        z.

PS: I looked at Logging on squeaksource but I will need more.. different
areas, min debug level per area, context... e.g. only debug if this process is
handling data for this IMSI

_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to