Ok

I' think i just need to add test and then is already usable. ( If you think
i must add anything, just say it :)* * )


About last changes and configuration:

The last add is pragma support: We have 2 pragmas configuration:

<logConfiguration> That indicates the class method*  *related know how to
manage de log configuration

There is support to usit this way:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
configurationOfLog
    <logConfiguration>
    ^ [
         :builder |
       builder forClass:LogTestObject
                 useLevel:#info
                 showingLogAs: ('%pih | %tstmp | %tag #%class >> %selector
[%log]' asPatternFormatter)
                 into: Transcript asLogWriter
                 holdLogInstances:true.
    ].
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

and this way

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
configurationOfLog: builder
    <logConfiguration>

       builder forClass:LogTestObject
                 useLevel:#info
                 showingLogAs: ('%pih | %tstmp | %tag #%class >> %selector
[%log]' asPatternFormatter)
                 into: Transcript asLogWriter
                 holdLogInstances:true.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


The other pragma is
<logConfigurationAs:#aSymbol >

This pragma says 'hey, forme use the #aSymbol configuration!', such as
#default.

then you can go to

LogConfiguration >> configuration class method

and add symbols with named configurations and relate with explicit classes
with a simple pragma :)


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

For other side, the manage of the 'if-the-class-has-not-configuration' is
the same, search for the package configuration (that should be added in
LogConfiguration >> configuration class method ), and if is not a package
configuration, then go for the #default configuration.



Tomorrow ill be adding tests and making a post on my blog with all the
functionalities:

Writers available (Memory, File, Stdout, Transcript, CompositeWriter)
Formatters available (Pattern based -the one of the sample- SimpleFormatter
and CustomFormatter)
Filters available (the one who says how to decides if the log must be
showed or just skiped -- CategoryFilter and LevelFilter. )
Holder ( an object which stores LogEntity objects - an object very much
richier than the string stored for MemoryWriter)

And ill add to the post how to write nice configurations with the existing
code and, of course, how to add functionality in the way i thought the
framework.


*Again, the idea of this framework is to be used for all and have just one
logger, so, please, if any one think i must add or change something, share
it here. And if any wants to get his hands on the code the same, just say
it.  *

Reply via email to