Log4Sandbox alpha 1.0

Rating: No reviews yet
Downloads: 73
Change Set: 43731
Released: Mar 2, 2010
Updated: Mar 2, 2010 by huzlibuzli
Dev status: Alpha Help Icon

Recommended Download

Application SDCH.SharePoint.Log4Sandbox.wsp
application, 105K, uploaded Mar 2, 2010 - 57 downloads

Other Available Downloads

Application SDCH.SharePoint.Log4Sandbox.UserCode.dll
application, 11K, uploaded Mar 2, 2010 - 16 downloads

Release Notes

This release was tested against SharePoint 2010 public beta. Not all key requirements are implemented yet.

Quick Start Guide

  • Add and deploy SDCH.SharePoint.Log4Sandbox.wsp
  • Activate farm feature Log4Sandbox trusted Proxy
  • Build a new Sandboxed Solution in VS2010
  • Add a reference to SDCH.SharePoint.Log4Sandbox.UserCode.dll
  • Define and assign a class member of the type LogContext
        protected LogContext mLog;

        public HelloProxy()
        {
            mLog = LogContextManager.GetLogContext(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        }
  • Use the LogContext member in your code to push logging messages
        mLog.Debug(txtInput.Text);
        mLog.Debug(txtInput.Text, new Exception(txtInput.Text + " Exception"));
        mLog.Warn(txtInput.Text);
        mLog.Warn(txtInput.Text, new Exception(txtInput.Text + " Exception"));
        mLog.Error(txtInput.Text);
        mLog.Error(txtInput.Text, new Exception(txtInput.Text + " Exception"));
        mLog.Fatal(txtInput.Text);
        mLog.Fatal(txtInput.Text, new Exception(txtInput.Text + " Exception"));
        mLog.Info(txtInput.Text);
        mLog.Info(txtInput.Text, new Exception(txtInput.Text + " Exception"));
  • Change the logging level or other log4net configuration settings by using the log4net.config file located in 14\CONFIG\SDCH.SharePoint.Log4Sandbox\. see log4net configuration (the central administration page is not implemented yet)

Reviews for this release

No reviews yet for this release.