Skip to content
This repository

A lightweight logging system designed specifically for Windows Store and Windows Phone 8 apps.

branch: master
.nuget Add support for Wpa81
MetroLog.Android Move linked files into shared project
MetroLog.NetCore.SQLite Add support for Wpa81
MetroLog.NetCore.Tests Add support for getting a zip file IStorageFile directly and a cleanu…
MetroLog.NetCore Move linked files into shared project
MetroLog.NetFx Move linked files into shared project
MetroLog.Shared.WinRT Wpa 8.1 support
MetroLog.Shared Move linked files into shared project
MetroLog.Tests Add support for Wpa81
MetroLog.WP8.Tests Add support for Wpa81
MetroLog.WP8 Move linked files into shared project
MetroLog.WinRT Move linked files into shared project
MetroLog.Wpa81 Move linked files into shared project
MetroLog.iOS Move linked files into shared project
MetroLog Move linked files into shared project
Samples Fix the solution with NetFX Project
WebTargetSample Add support for Wpa81
Win8Sample Add support for Wpa81
WinJSSample Add support for Wpa81
metrolog Added LogConfigurator/LoggingEnvironment
typescript Update TS
.gitattributes change order
.gitignore Update NuGet package
LICENSE.txt Added text of MIT license as it was missing
MetroLog ReadMe.txt Fix issue where readme was considered a content resource by the winmd…
MetroLog.nuspec fixup paths
MetroLog.sln Move linked files into shared project
MetroLog.sln.DotSettings Link files into plat-specific libs to enable targetting WP8 in the core
MetroLog.snk Initial split into portable core
README.mdown Readme
SharedAssemblyInfo.cs Add support for Wpa81
pack.cmd Update NuGet package
README.mdown

Overview

MetroLog is a lightweight logging framework designed for Windows Store and Windows Phone 8 apps. Although the API is based on NLog and log4net, the intention is that it's a very basic logging system.

The need for it to be basic comes from the fact that the Windows Store apps API surface area intentionally limited for very specific applications. This project came out of the fact that porting NLog to Windows Store apps is difficult because of it's incredibly rich feature set, most of which is not workable in Windows Store apps.

Out-of-the-box, logging operations are intended to send all log levels to Debug.WriteLine and EventTracingForWindows (ETW). and ERROR and FATAL levels to a file in the app's LocalState folder using FileSnapshotTarget.

Caution on using Debug.WriteLine with NuGet. The NuGet packages are compiled as RELEASE mode and Debug.WriteLine calls are #ifdef'd out. Use the ETW mode, or FileStreamingTarget to see levels TRACE through WARN.

For Windows Store apps we recommend that you configure the SQLiteTarget. For support purposes, you can load entries back out of the SQLite database and package them for email over the Share charm.

You can use JsonPostTarget to stream log messages back to an HTTP/HTTPS end-point of your own design. (Although we provide a sample app.)

We ensure that MetroLog is compataible with WACK requirements.

Documentation

The intention is that MetroLog is mostly compatible with NLog. Both the surface area and internal construction should just about match.

To get started, read the Configuration entry in the wiki.

Unit testing

This project uses xUnit.NET, rather than the built-in MSTest. Use the xUnit.NET Test Runner for Visual Studio 2012 to enable VS 2012 to discover and run the unit tests.

Meta

This is an open source project that welcomes contributions/suggestions/bug reports from those who use it. If you have any ideas on how to improve the library, please contact @mbrit or @onovotny.

MetroLog is distributed under the MIT license.

Something went wrong with that request. Please try again.