internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); if (this._exception != null) { Exception innerException = this._exception; for (int i = 0; (innerException != null) && (i <= 2); i++) { formatter.AppendLine(string.Empty); if (i == 0) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_information")); } else { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_inner_exception_information", i.ToString(CultureInfo.InstalledUICulture))); } formatter.IndentationLevel++; formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_type", innerException.GetType().ToString())); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_message", innerException.Message)); formatter.IndentationLevel--; innerException = innerException.InnerException; } } }
public override void FormatCustomEventDetails(WebEventFormatter formatter) { base.FormatCustomEventDetails(formatter); formatter.AppendLine("User Name: " + _user.Username); formatter.AppendLine("Culture: " + _culture); }
internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); if (this._exception != null) { Exception innerException = this._exception; for (int i = 0; (innerException != null) && (i <= 2); i++) { formatter.AppendLine(string.Empty); if (i == 0) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_information")); } else { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_inner_exception_information", i.ToString(CultureInfo.InstalledUICulture))); } formatter.IndentationLevel++; formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_type", innerException.GetType().ToString())); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_message", innerException.Message)); formatter.IndentationLevel--; innerException = innerException.InnerException; } } }
public void FormatToString(WebEventFormatter formatter) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_domain", this.ApplicationDomain)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_trust_level", this.TrustLevel)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_virtual_path", this.ApplicationVirtualPath)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_path", this.ApplicationPath)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_machine_name", this.MachineName)); }
internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(string.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_ViewStateException_information")); formatter.IndentationLevel++; formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_message", this._viewStateException.Message)); formatter.IndentationLevel--; }
internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(string.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_ViewStateException_information")); formatter.IndentationLevel++; formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_exception_message", this._viewStateException.Message)); formatter.IndentationLevel--; }
internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(string.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_statistics")); formatter.IndentationLevel++; s_procStats.FormatToString(formatter); formatter.IndentationLevel--; }
internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(string.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_statistics")); formatter.IndentationLevel++; s_procStats.FormatToString(formatter); formatter.IndentationLevel--; }
internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(string.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_information")); formatter.IndentationLevel++; this.RequestInformation.FormatToString(formatter); formatter.IndentationLevel--; }
// Formats Web request event information. // This method is invoked indirectly by the provider using one of the // overloaded ToString methods. If buffering is enabled, this method is // called asynchronously on a non-Web request thread, where the // HttpContext is not available. public override void FormatCustomEventDetails(WebEventFormatter formatter) { base.FormatCustomEventDetails(formatter); formatter.AppendLine(">>User ID: " + userID); formatter.AppendLine(">>Authentication Type: " + authType); formatter.AppendLine(">>User Authenticated: " + isAuthenticated.ToString()); formatter.AppendLine(">>Activity Description: Critical Operation"); }
internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(string.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_information")); formatter.IndentationLevel++; this.RequestInformation.FormatToString(formatter); formatter.IndentationLevel--; }
public override void FormatCustomEventDetails(WebEventFormatter formatter) { if (ajaxProcessor != null) { MethodInfo methodInfo = ajaxProcessor.AjaxMethod; object[] paremeters = ajaxProcessor.RetreiveParameters(); string str = string.Format("TargetSite: {0}", exception.TargetSite); formatter.AppendLine(str); formatter.AppendLine(""); if (System.Web.HttpContext.Current.Items[Constant.AjaxID + ".JSON"] != null) { formatter.AppendLine("JSON: " + System.Web.HttpContext.Current.Items[Constant.AjaxID + ".JSON"].ToString()); formatter.AppendLine(""); } str = string.Format(Constant.AjaxID + " Method: {0}.{1}", methodInfo.ReflectedType.ToString(), methodInfo.Name); formatter.AppendLine(str); formatter.AppendLine(""); if (this.parameters != null) { foreach (object o in this.parameters) { formatter.AppendLine(string.Format("Parameter: {0}", o)); } formatter.AppendLine(""); } formatter.AppendLine("StrackTrace:"); formatter.AppendLine(exception.StackTrace); } else { string str = string.Format("TargetSite: {0}", exception.TargetSite); formatter.AppendLine(str); formatter.AppendLine(""); if (System.Web.HttpContext.Current.Items[Constant.AjaxID + ".JSON"] != null) { formatter.AppendLine("JSON: " + System.Web.HttpContext.Current.Items[Constant.AjaxID + ".JSON"].ToString()); formatter.AppendLine(""); } formatter.AppendLine("StrackTrace:"); formatter.AppendLine(exception.StackTrace); } base.FormatCustomEventDetails(formatter); }
/// <summary> /// Formats the event information for the provider. /// </summary> /// <param name="formatter">Standard formatter for health monitoring events.</param> public override void FormatCustomEventDetails(System.Web.Management.WebEventFormatter formatter) { //Format our custom event information. formatter.AppendLine(String.Empty); formatter.AppendLine("*** Start of custom event information"); formatter.AppendLine(msgCreated); formatter.AppendLine(msgRaised); formatter.AppendLine("*** End of custom event information"); }
public void FormatToString(WebEventFormatter formatter) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_id", this.ThreadID.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_account_name", this.ThreadAccountName)); if (this.IsImpersonating) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_impersonating")); } else { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_not_impersonating")); } formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_stack_trace", this.StackTrace)); }
public void FormatToString(WebEventFormatter formatter) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_id", this.ThreadID.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_account_name", this.ThreadAccountName)); if (this.IsImpersonating) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_impersonating")); } else { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_not_impersonating")); } formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_stack_trace", this.StackTrace)); }
public void FormatToString(WebEventFormatter formatter) { string name; string authenticationType; bool isAuthenticated; if (this.Principal == null) { name = string.Empty; authenticationType = string.Empty; isAuthenticated = false; } else { IIdentity identity = this.Principal.Identity; name = identity.Name; isAuthenticated = identity.IsAuthenticated; authenticationType = identity.AuthenticationType; } formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_url", this.RequestUrl)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_path", this.RequestPath)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_user_host_address", this.UserHostAddress)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_user", name)); if (isAuthenticated) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_authenticated")); } else { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_not_authenticated")); } formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_authentication_type", authenticationType)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_account_name", this.ThreadAccountName)); }
public void FormatToString(WebEventFormatter formatter) { string name; string authenticationType; bool isAuthenticated; if (this.Principal == null) { name = string.Empty; authenticationType = string.Empty; isAuthenticated = false; } else { IIdentity identity = this.Principal.Identity; name = identity.Name; isAuthenticated = identity.IsAuthenticated; authenticationType = identity.AuthenticationType; } formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_url", this.RequestUrl)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_path", this.RequestPath)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_user_host_address", this.UserHostAddress)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_user", name)); if (isAuthenticated) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_authenticated")); } else { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_is_not_authenticated")); } formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_authentication_type", authenticationType)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_account_name", this.ThreadAccountName)); }
public virtual string ToString(bool includeAppInfo, bool includeCustomEventDetails) { WebEventFormatter formatter = new WebEventFormatter(); this.FormatToString(formatter, includeAppInfo); if (!this.IsSystemEvent && includeCustomEventDetails) { formatter.AppendLine(string.Empty); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_custom_event_details")); formatter.IndentationLevel++; this.FormatCustomEventDetails(formatter); formatter.IndentationLevel--; } return(formatter.ToString()); }
public virtual void FormatToString(WebEventFormatter formatter) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_start_time", this.ProcessStartTime.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_count", this.ThreadCount.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_working_set", this.WorkingSet.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_peak_working_set", this.PeakWorkingSet.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_managed_heap_size", this.ManagedHeapSize.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_domain_count", this.AppDomainCount.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_requests_executing", this.RequestsExecuting.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_queued", this.RequestsQueued.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_rejected", this.RequestsRejected.ToString(CultureInfo.InstalledUICulture))); }
public virtual void FormatToString(WebEventFormatter formatter) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_start_time", this.ProcessStartTime.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_thread_count", this.ThreadCount.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_working_set", this.WorkingSet.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_peak_working_set", this.PeakWorkingSet.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_managed_heap_size", this.ManagedHeapSize.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_application_domain_count", this.AppDomainCount.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_requests_executing", this.RequestsExecuting.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_queued", this.RequestsQueued.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_request_rejected", this.RequestsRejected.ToString(CultureInfo.InstalledUICulture))); }
// Formats critical transaction event information.. public override void FormatCustomEventDetails(WebEventFormatter formatter) { base.FormatCustomEventDetails(formatter); // Add custom data. formatter.AppendLine(""); formatter.IndentationLevel += 1; formatter.AppendLine("** CriticalTransactionEvent Start **"); formatter.AppendLine(eventInfo.ToString()); formatter.AppendLine("** CriticalTransactionEvent End **"); formatter.IndentationLevel -= 1; }
/// <summary> Format custom event details. Calls the base method and then adds the exception on a new line. </summary> /// <remarks> ebrown, 11/10/2010. </remarks> /// <exception cref="ArgumentNullException"> Thrown when one or more required arguments are null. </exception> /// <param name="formatter"> The formatter. </param> public override void FormatCustomEventDetails(WebEventFormatter formatter) { if (null == formatter) { throw new ArgumentNullException("formatter"); } base.FormatCustomEventDetails(formatter); formatter.AppendLine(_exception.ToString()); }
internal virtual void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_code", this.EventCode.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_message", this.Message)); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_time", this.EventTime.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_time_Utc", this.EventTimeUtc.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_id", this.EventID.ToString("N", CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_sequence", this.EventSequence.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_occurrence", this.EventOccurrence.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_detail_code", this.EventDetailCode.ToString(CultureInfo.InstalledUICulture))); if (includeAppInfo) { formatter.AppendLine(string.Empty); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_application_information")); formatter.IndentationLevel++; ApplicationInformation.FormatToString(formatter); formatter.IndentationLevel--; } }
public override void FormatCustomEventDetails(WebEventFormatter formatter) { base.FormatCustomEventDetails(formatter); formatter.AppendLine(""); formatter.IndentationLevel += 1; formatter.AppendLine( "* mojoWebAuthenticationFailureAuditEvent Start *"); formatter.AppendLine(string.Format("Request path: {0}", RequestInformation.RequestPath)); formatter.AppendLine(string.Format("Request Url: {0}", RequestInformation.RequestUrl)); formatter.AppendLine(customCreatedMsg); formatter.AppendLine(customRaisedMsg); formatter.AppendLine( "* mojoWebAuthenticationFailureAuditEvent End *"); formatter.IndentationLevel -= 1; }
internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(string.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_name_to_authenticate", this._nameToAuthenticate)); }
public void FormatToString(WebEventFormatter formatter) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_id", this.ProcessID.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_name", this.ProcessName)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_account_name", this.AccountName)); }
public override void FormatCustomEventDetails(WebEventFormatter formatter) { base.FormatCustomEventDetails(formatter); formatter.AppendLine(String.Concat("TMailController: ", Controller)); formatter.AppendLine(String.Concat("TMailAction: ", Action)); }
override internal void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(String.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_request_information)); formatter.IndentationLevel += 1; RequestInformation.FormatToString(formatter); formatter.IndentationLevel -= 1; }
override internal void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(String.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_ViewStateException_information)); formatter.IndentationLevel += 1; formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_exception_message, _viewStateException.Message)); formatter.IndentationLevel -= 1; }
public void FormatToString(WebEventFormatter formatter) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_application_domain, ApplicationDomain)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_trust_level, TrustLevel)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_application_virtual_path, ApplicationVirtualPath)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_application_path, ApplicationPath)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_machine_name, MachineName)); }
public override void FormatCustomEventDetails(WebEventFormatter formatter) { formatter.AppendLine(_sb.ToString()); base.FormatCustomEventDetails(formatter); }
public void FormatToString(WebEventFormatter formatter) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_id", this.ProcessID.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_process_name", this.ProcessName)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_account_name", this.AccountName)); }
override internal void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); if (_exception == null) { return; } Exception ex = _exception; // Please note we arbitrary pick a level limit per bug VSWhidbey 143859 for (int level = 0; ex != null && level <= 2; ex = ex.InnerException, level++) { formatter.AppendLine(String.Empty); if (level == 0) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_exception_information)); } else { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_inner_exception_information, level.ToString(CultureInfo.InstalledUICulture))); } formatter.IndentationLevel += 1; formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_exception_type, ex.GetType().ToString())); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_exception_message, ex.Message)); formatter.IndentationLevel -= 1; } }
internal virtual void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_code", this.EventCode.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_message", this.Message)); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_time", this.EventTime.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_time_Utc", this.EventTimeUtc.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_id", this.EventID.ToString("N", CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_sequence", this.EventSequence.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_occurrence", this.EventOccurrence.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_detail_code", this.EventDetailCode.ToString(CultureInfo.InstalledUICulture))); if (includeAppInfo) { formatter.AppendLine(string.Empty); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_application_information")); formatter.IndentationLevel++; ApplicationInformation.FormatToString(formatter); formatter.IndentationLevel--; } }
internal override void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { base.FormatToString(formatter, includeAppInfo); formatter.AppendLine(string.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache("Webevent_event_name_to_authenticate", this._nameToAuthenticate)); }
virtual internal void FormatToString(WebEventFormatter formatter, bool includeAppInfo) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_code, EventCode.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_message, Message)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_time, EventTime.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_time_Utc, EventTimeUtc.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_id, EventID.ToString("N", CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_sequence, EventSequence.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_occurrence, EventOccurrence.ToString(CultureInfo.InstalledUICulture))); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_detail_code, EventDetailCode.ToString(CultureInfo.InstalledUICulture))); if (includeAppInfo) { formatter.AppendLine(String.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_application_information)); formatter.IndentationLevel += 1; ApplicationInformation.FormatToString(formatter); formatter.IndentationLevel -= 1; } }
/// <summary> /// INFO: http://msdn.microsoft.com/en-us/library/ff650305.aspx#paght000011_step1 /// </summary> public override void FormatCustomEventDetails(WebEventFormatter formatter) { base.FormatCustomEventDetails(formatter); formatter.AppendLine("CallerInfo:"); formatter.AppendLine(CallerInfo); formatter.AppendLine(""); if (ExtraInfo != null) { try { var info = _serializer.Serialize(ExtraInfo); if (!string.IsNullOrEmpty(info)) { formatter.AppendLine("ExtraInfo:"); formatter.AppendLine(info); formatter.AppendLine(""); } } catch (Exception e) { HealthMonitoring.LogException("Error serializing: ExtraInfo", e); } } formatter.AppendLine("Params:"); formatter.AppendLine(Params); }
public void FormatToString(WebEventFormatter formatter) { string user; string authType; bool authed; if (Principal == null) { user = String.Empty; authType = String.Empty; authed = false; } else { IIdentity id = Principal.Identity; user = id.Name; authed = id.IsAuthenticated; authType = id.AuthenticationType; } formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_request_url, RequestUrl)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_request_path, RequestPath)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_user_host_address, UserHostAddress)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_user, user)); if (authed) { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_is_authenticated)); } else { formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_is_not_authenticated)); } formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_authentication_type, authType)); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_thread_account_name, ThreadAccountName)); }
public virtual string ToString(bool includeAppInfo, bool includeCustomEventDetails) { WebEventFormatter formatter = new WebEventFormatter(); this.FormatToString(formatter, includeAppInfo); if (!this.IsSystemEvent && includeCustomEventDetails) { formatter.AppendLine(string.Empty); formatter.AppendLine(FormatResourceStringWithCache("Webevent_event_custom_event_details")); formatter.IndentationLevel++; this.FormatCustomEventDetails(formatter); formatter.IndentationLevel--; } return formatter.ToString(); }
public virtual string ToString(bool includeAppInfo, bool includeCustomEventDetails) { WebEventFormatter formatter = new WebEventFormatter(); FormatToString(formatter, includeAppInfo); if (!IsSystemEvent && includeCustomEventDetails) { formatter.AppendLine(String.Empty); formatter.AppendLine(WebBaseEvent.FormatResourceStringWithCache(SR.Webevent_event_custom_event_details)); formatter.IndentationLevel += 1; FormatCustomEventDetails(formatter); formatter.IndentationLevel -= 1; } return formatter.ToString(); }