-*- markdown -*-

# SLog - log4j style logging for Silverlight.

* Brendan W. McAdams <>

## About

This is still a fairly simple port - chaining of logging changes doesn't work, and the only appender is a sample Firebug appender.  I found it incredibly useful though, and with a little bit of work it could be finished off.

## Sample usage

You need to instantiate a logger to work with...

In C# (Import the sLog system of course) as a class value:

    private static Logger logger = Logger.getLogger(typeof (<ClassNameHere>));

Then you can invoke the logging methods.  See the code for the rest of the docs.

In Python (make sure you clr.AddReference the DLL and import it; you should only need to clr.AddReferenceToFile only once per app, I do all of mine at the level):
    from SLog import Logger 

    # ...

    logger.debug("Existing Data Update {0} / {1}", self._wizard.data_name, args.NewValue)

I recommend using C# style format strings wherever possible (the last argument to all the logging methods is the equiv of args*) as SLog will ONLY format the string [saving potential CPU cycles] if the method call matches the currently configured logging level.

Past that, improved code and better docs forthcoming.