You are developing an application that uses a .config file.
The relevant portion of the .config file is shown as follows:
You need to ensure that diagnostic data for the application writes to the event log by using the
configuration specified in the .config file.
What should you include in the application code?

A.
Option A
B.
Option B
C.
Option C
D.
Option D
Explanation:
http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.eventlogtracelistener
Public static void Main(string[] args) {
Create a trace listener for the event log.
EventLogTraceListener myTraceListener = new EventLogTraceListener(“myEventLogSource”);
Add the event log trace listener to the collection.
Trace.Listeners.Add(myTraceListener);
// Write output to the event log.
Trace.WriteLine(“Test output”);
}
i think it’s C as in the previous question:
http://www.aiotestking.com/microsoft/what-should-you-include-in-the-application-code-3/
3
0
only D write to EventLog
0
1
Agreed !
0
1
I think explanation is correct(C is correct answer). Type of the event log is defined in the config file.
1
0
Question is about “Diagnostic data” – it should be Debug 100%, because Trace is used for “Release version”.
Answer is A
https://msdn.microsoft.com/en-us/library/system.diagnostics.eventlogtracelistener(v=vs.110).aspx
“Remarks
An instance of this EventLogTraceListener can be added to the Debug.Listeners, Trace.Listeners, or TraceSource.Listeners collections to send output from tracing or debugging to an Windows EventLog”
1
0
Diagnostic data contains ‘Debug’ and ‘Trace’. No mention here that it is for debugging purposes only.
A – Writes “Trace data…” to debug logs… this doesn’t make sense to me, think this is the hint that you should not pick A
Its C.
3
0