system.diagnostics Questions
1
Solved
The following program does not print the text "This is a trace". There is no app.config.
My question is, how can I modify the following code (and only the code, not any configuration files) such t...
Moose asked 9/11, 2013 at 1:4
1
Solved
I'm trying to attach a listener to a running process which uses an EventSource to trace processing events. I've gotten as far as creating my own listener by inheriting from EventListener and (presu...
Sophrosyne asked 24/9, 2013 at 10:54
4
Solved
I run ffmpeg like this:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo = new System.Diagnostics.ProcessStartInfo(ffmpegPath, myParams);
p.Start();
p.WaitForExit();
...
Caron asked 7/9, 2009 at 18:45
2
Solved
I am trying to understand the difference between Trace.Write vs Trace.TraceInformation and which one should be used.
I tried to configure traceOutputOptions for timestamp/datetime. I just need an...
Glasses asked 31/1, 2011 at 14:41
2
Solved
I use the TraceSource class for logging in my .NET projects.
However a point that has never been clear to me is, what the intent of the id parameter in the TraceEvent method. Currently, I always s...
Nannette asked 11/7, 2013 at 9:59
2
I have written a piece of code like this below:
For testing i call the method ComputeAndLog and in the performance monitor i can see the non-zero average value. However as soon as i end my testing...
Eijkman asked 14/3, 2012 at 21:21
2
I have seen many other questions on logging. Best practices. What logging platform is best. Etc. Here are some links from here on SO with very good discussions on the topic:
logging best practices...
Aria asked 9/9, 2010 at 17:5
1
Wondering if any of you have any ideas about the following issue I’m running into.
Here is some super simple plug-in code.
namespace Demo.DebugTraceBlog
{
public class TraceAndDebugDemo : IPlugi...
Boer asked 6/1, 2013 at 15:50
2
Solved
We have an IIS WCF service that launches another process (app.exe) as a different user. I have complete control over both applications (and this is a dev environment for now). The IIS app pool runs...
Chacma asked 22/3, 2013 at 22:55
1
Solved
I would like to set the AutoFlush attribute to true, but I need to do it by code. Programmatically.
I have found this how to configure the trace element and also the AutoFlush property of the Trac...
Slack asked 22/3, 2013 at 16:48
5
So I am writing an application that monitors a console application that was written by another developer. The console application is prone to crashing and because it runs all night i need my applic...
Mathewson asked 6/3, 2012 at 20:12
2
Solved
I am hooking the Security event log with System.Diagnostics.Eventing.Reader.EventLogWatcher class, and I am watching Event ID 4625 on a 2008 server box, for incoming failed logins (RDP, specificall...
Aquamarine asked 14/11, 2009 at 15:55
2
Solved
Anyone knows the difference between System.Diagnostic.Trace and System.Diagnostic.TraceSource classes?
I've been using Trace for most of my projects and I just happen to found out about TraceSourc...
Oregon asked 8/7, 2009 at 23:55
7
Solved
I've been searching and experimenting for a while with this, but I have had no luck.
I am trying to make a console program to automate some tasks that I couldn't quite do with a BAT file. I want t...
Habited asked 3/11, 2011 at 23:35
1
Solved
In my web.config I have:
<system.diagnostics>
<switches>
<add name="logLevelSwitch" value="1" />
</switches>
</system.diagnostics>
Is there a way that I could ca...
Charolettecharon asked 28/10, 2012 at 11:52
1
Solved
I have an instance of PerformanceCounter, I call NextSample() on it and get a CounterSample. In it, there are several time-related fields: CounterFrequency, SystemFrequency, CounterTimeStamp, Times...
Taveda asked 3/4, 2012 at 15:22
2
Solved
I was looking for a solution to provide logging to my latest project when I came across an article ( http://www.daveoncsharp.com/2009/09/create-a-logger-using-the-trace-listener-in-csharp/ ) that t...
Biddie asked 10/10, 2012 at 0:52
4
Im using GPG to encrypt a file in ASP.NET, C#. My code executes the command using ProcessStartInfo, and gpg.exe executes, but I have an issue. GPG asks me to authorize always-trust with "y" as the ...
Atkinson asked 29/8, 2011 at 18:5
2
Solved
I can get information about a parameter by StackTrace using something like this:
catch (Exception ex)
{
var st = new StackTrace(ex);
System.Reflection.ParameterInfo pi = st.GetFrame(0).GetMetho...
President asked 26/5, 2012 at 20:49
5
Solved
How to translate MS Windows OS version numbers into product names?
For example, in .NET the following two properties could be used to work out that the product is MS Windows Vista Ultimate Edition...
Tlaxcala asked 13/2, 2009 at 11:51
5
Solved
I have a worker role that works perfectly in development but doesn't work when deployed. "Doesn't work" is rather vague, but that's really all I have to go on as I'm not seeing any errors or anythi...
Waterproof asked 23/2, 2012 at 9:31
4
Solved
I am trying to use Microsoft.VisualBasic.Logging.FileLogTraceListener in my ASP.NET MVC 3 app (vb.net). It works in my dev PC but throws an error when run from an IIS 6 server. Here is the web.conf...
Gallstone asked 17/10, 2011 at 12:12
2
Solved
Please see this question for background information:
How do Tasks in the Task Parallel Library affect ActivityID?
That question asks how Tasks affect Trace.CorrelationManager.ActivityId. @Greg Sa...
Largo asked 18/1, 2011 at 21:53
2
Solved
I'm trying to capture output from a console application by running it in a test using System.Diagnostics.Process. I'm having trouble with character encoding. "£" is showing up as "œ" in the test, b...
Handtohand asked 27/1, 2012 at 23:49
4
Solved
I'm totally confused between these 4. What is the difference between ElapsedMilliseconds (long), ElapsedTicks (long), Elapsed.TotalMilliseconds (double) and Elapsed.Milliseconds (int)?
I have a f...
Morocco asked 17/1, 2012 at 12:15
© 2022 - 2024 — McMap. All rights reserved.