Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

-*- 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.

Recent activity

Nothing to see here, move along.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.