This project is read-only.

How to include SilverlightLogging into your client project

1. Add a reference to the library
For Windows Phone 7: VXCompany.SilverlightLogging.WP7.dll
For Silverlight 4: VXCompany.SilverlightLogging.SL4

2. Add the block in your app.xaml file (sample: App.Xaml)

3. Optionally add the LogStatusControl usercontrol to your page.
Sample XAML:

<UserControl x:Class="VXCompany.SilverlightLogging.SLTestUI.MainPage"
d:DesignHeight="300" d:DesignWidth="400">

<Grid x:Name="LayoutRoot" Background="White">
<lv:LogStatusControl x:Name="logStatus" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />

4. Make sure the file ServiceReferences.ClientConfig in your entry project has the correct service URL.
The default location is: http://localhost/VXCompany.SilverlightLogging.Services/LoggingService.svc

5. Test your configuration by attempting to log your first exception:

throw new Exception("Generated Exception from LogStatusControl.");
catch (Exception ex)
ExceptionPolicy.Current.HandleException(ex, ServiceProxy.ErrorLevel.Critical);

...or click the button 'Create Error' on the usercontrol, which does the same.

Last edited Nov 23, 2010 at 4:54 PM by lduys, version 4


lduys Jan 5, 2011 at 12:16 PM 
There's no true support for tracing. But, you can wrap your information in an Exception and use the Level property to mark it as Informational or Warning. You can alter the service to handle these messages differently. (store in text file for instance)

ikujundzic Nov 30, 2010 at 9:51 AM 
can I log something other than Exception?
E.g. debugging info, string messages etc.