e79aa3c0ed
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
//------------------------------------------------------------------------------
|
|
// <copyright file="TraceWebEventProvider.cs" company="Microsoft">
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// </copyright>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace System.Web.Management {
|
|
using System.Configuration;
|
|
using System.Configuration.Provider;
|
|
using System.Collections.Specialized;
|
|
using System.Web.Util;
|
|
using System.Security.Permissions;
|
|
|
|
////////////
|
|
// Events
|
|
////////////
|
|
|
|
public sealed class TraceWebEventProvider : WebEventProvider, IInternalWebEventProvider {
|
|
|
|
internal TraceWebEventProvider() { }
|
|
|
|
public override void Initialize(string name, NameValueCollection config)
|
|
{
|
|
Debug.Trace("TraceWebEventProvider", "Initializing: name=" + name);
|
|
base.Initialize(name, config);
|
|
|
|
ProviderUtil.CheckUnrecognizedAttributes(config, name);
|
|
}
|
|
|
|
public override void ProcessEvent(WebBaseEvent eventRaised)
|
|
{
|
|
if (eventRaised is WebBaseErrorEvent) {
|
|
System.Diagnostics.Trace.TraceError(eventRaised.ToString());
|
|
}
|
|
else {
|
|
System.Diagnostics.Trace.TraceInformation(eventRaised.ToString());
|
|
}
|
|
}
|
|
|
|
public override void Flush() {
|
|
}
|
|
|
|
public override void Shutdown() {
|
|
}
|
|
}
|
|
|
|
}
|
|
|