Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A lightweight logging system designed specifically for Windows Store and Windows Phone 8 apps.
C# JavaScript CSS HTML Other
Branch: master
Failed to load latest commit information.
.nuget update nuget
MetroLog.Android Add GitVersion
MetroLog.NetCore.SQLite Add GitVersion
MetroLog.NetCore.Tests Add iOS unified support
MetroLog.NetCore Ref correct shared file
MetroLog.NetFx Add GitVersion
MetroLog.Shared.WinRT Check for design mode and don't enable logging
MetroLog.Shared Ref correct shared file
MetroLog.Tests Update xunit
MetroLog.WP8.Tests Add support for Wpa81
MetroLog.WP8 disable gitver in proj due to conflict
MetroLog.WinRT Add GitVersion
MetroLog.Wpa81 Add GitVersion
MetroLog.iOS-Unified Add GitVersion
MetroLog.iOS Add GitVersion
MetroLog Add GitVersion
Samples/ConsoleSample Fix the solution with NetFX Project
WebTargetSample Add support for Wpa81
Win8Sample Retarget to win 8.1
WinJSSample Retarget to win 8.1
iOSClassicSample Add iOS sample project
iOSUnifiedSample Add iOS unified support
metrolog/targets Added LogConfigurator/LoggingEnvironment
packages Update xunit
typescript Update TS
.gitattributes change order
.gitignore add vs cache dir
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 Check for design mode and don't enable logging
MetroLog.sln Ref correct shared file
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
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.