Tian:
Thank you very much for your response and concern. See my answers
inline.
> 1. Which EventPublishLogLevel and ApplicationLogLevel do you set? Were you
> debugging the program?
I'm setting ApplicationLogLevel in app.config manually.
EventPublishLogLevel is being set in the call to EventManager.Publish.
Remember that I am using the EIFExceptionPublisher which is a special
exception publisher that works with the logging block. This is how I
enable it in my app.config:
<exceptionManagement mode="on">
<publisher assembly="Microsoft.ApplicationBlocks.Logging.EIFPublisher"
type="Microsoft.ApplicationBlocks.Logging.EIFPublisher.EIFExceptionPublisher"
include="*" />
</exceptionManagement>
> 2. If you publish an error, you can also set Log Level to Error in order
> lot it. That is, there is no need to set it to Debug. It's true that all
[quoted text clipped - 5 lines]
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/
> Logging-CH02.asp?frame=true
I've read that article and more -- but perhaps I missed something.
How does one set the EventPublishLogLevel when the only call I am
making is:
ExceptionManager.Publish(string Msg)?
At that point, the EIFExceptionPublisher logs an ErrorMessageEvent and
sets the EventPublishLogLevel to 5 (debug). I see no opportunity to
override that.
Thanks for you help and insight. I've included the complete
ErrorMessageEvent as it appears in my trace log. Note that the
EIFExceptionPublisher puts all the exception info that the Exception
Management Application Block generates within the "Message" property
of the ErrorMessageEvent. Note also -- at the end -- the
EventPublishLogLevel of 5.
Microsoft.ApplicationBlocks.Logging.Schema.ErrorMessageEvent
{
String Message = "
General Information
*********************************************
Additional Info:
ExceptionManager.MachineName: PHAETON
ExceptionManager.TimeStamp: 4/21/2004 5:02:56 PM
ExceptionManager.FullName:
Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1536.23866, Culture=neutral, PublicKeyToken=null
ExceptionManager.AppDomainName: KSURLawCaseManager.exe
ExceptionManager.ThreadIdentity:
ExceptionManager.WindowsIdentity: KSFHH\pinsley
1) Exception Information
*********************************************
Exception Type: Microsoft.ApplicationBlocks.ExceptionManagement.BaseApplicationException
<redacted>
StackTrace Information
*********************************************
at KSURLawCaseManager.FrmMain..ctor()"
String ErrorCode = ""
Int32 Severity = 0
Int32 ProcessID = 1432
String ProcessName =
"C:\Source\LitSup\URLawUtils\KSURLawCaseManager\bin\Release\KSURLawCaseManager.exe"
String ThreadName = ""
ComPlusInfo ComPlus = {
String ActivityID = ""
String ApplicationID = ""
String TransactionID = ""
String DirectCaller = ""
String OriginalCaller = ""
}
WindowsSecurityInfo WindowsSecurity = {
<redacted>
}
ManagedSecurityInfo ManagedSecurity = {
String IdentityName = ""
String AuthenticationType = ""
Boolean IsAuthenticated = False
}
String StackTrace = " at
Microsoft.ApplicationBlocks.Logging.Schema.ErrorMessageEvent.Raise(EventSource
eventSource, String message, Int32 severity, String errorCode)
at Microsoft.ApplicationBlocks.Logging.Schema.ErrorMessageEvent.Raise(String
message, Int32 severity, String errorCode)
at Microsoft.ApplicationBlocks.Logging.EIFPublisher.EIFExceptionPublisher.Publish(Exception
exception, NameValueCollection additionalInfo, NameValueCollection
configSettings)
at Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManager.PublishToCustomPublisher(Exception
exception, NameValueCollection additionalInfo, PublisherSettings
publisher)
at Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManager.Publish(Exception
exception, NameValueCollection additionalInfo)
at Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManager.Publish(Exception
exception)
at KSURLawCaseManager.FrmMain..ctor()
at KSURLawCaseManager.FrmMain.Main()"
String ApplicationName = <null>
String EventSourceInstance = "824f1650-969c-4bdb-8f71-02af828196ba"
String EventId = "e19f8ced-fbac-4457-8798-8df36ec2d964"
String EventSourceName = "Application"
Int64 EventSequenceNumber = 1
String EventSchemaVersion = "1.0.0.0"
DateTime TimeStamp = 4/21/2004 9:02:57 PM
String AppDomainName = "KSURLawCaseManager.exe"
String MachineName = "PHAETON"
String RootRequestName = ""
String RootRequestInstance = ""
String RequestInstance = ""
String RequestName = ""
Int64 RequestSequenceNumber = 0
Int32 EventLogEntryTypeID = 1
Boolean PopulatingEventInfoForFirstTime = False
Int32 ApplicationLogLevel = 5
Int32 EventPublishLogLevel = 5
String FormatterName = <null>
}
Tian Min Huang - 27 Apr 2004 02:22 GMT
Hi,
Thanks for your response. I am checking this issue and will update you with
my information.
Have a nice day!
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.