[squeak-dev] Logging from the Compiler
Tobias Pape
Das.Linux at gmx.de
Sun Dec 8 23:50:37 UTC 2013
On 08.12.2013, at 23:46, Frank Shearar <frank.shearar at gmail.com> wrote:
> Compiler depends on System because changing stuff - adding methods,
> changing classes, etc. - sends messages to SystemChangeNotifier
> uniqueInstance.
>
> While convenient, it (a) is inflexible and (b) causes a cycle. The
> correct relationship is that System uses Compiler.
>
> With that in mind, _a_ solution to this problem is to log things
> through a callback/registration mechanism of some kind. If you care
> about logging, you create a Compiler, say "log here" and off you go.
> (This means that you remove the log: part of a lot of methods in
> Compiler - if you don't have a logger/loggers attached, nothing
> happens, rather than logThis ifTrue: [] blocks. (Because you by
> default have a null logger.))
>
> Thoughts? Other possible approaches?
+1 from skimming your idea.
Best
-Tobias
More information about the Squeak-dev
mailing list
|