trace

How to define custom TraceListener in app.config

安稳与你 提交于 2019-11-27 17:26:09
I have implemented a custom trace listener (derived from TextWriteTraceListener ) and now I would like to set my application to use it instead of standard TextWriteTraceListener . First I added default TextWriteTraceListener in order to make sure it works ok and it does. Here's my app.config: <configuration> <system.diagnostics> <trace autoflush="true" indentsize="4"> <listeners> <add name="TextListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="trace.log" /> <remove name="Default" /> </listeners> </trace> </system.diagnostics> </configuration> Now my trace listener is

How to add (simple) tracing in C#? [closed]

柔情痞子 提交于 2019-11-27 16:42:13
I want to introduce some tracing to a C# application I am writing. Sadly, I can never really remember how it works and would like a tutorial with reference qualities to check up on every now and then. It should include: App.config / Web.config stuff to add for registering TraceListeners how to set it up in the calling application Do you know the uber tutorial that we should link to? EDIT: Glenn Slaven pointed me in the right direction. Add this to your App.config/Web.config inside <configuration/> : <system.diagnostics> <trace autoflush="true"> <listeners> <add type="System.Diagnostics

Live javascript debugging by recording function calls and parameters [duplicate]

半城伤御伤魂 提交于 2019-11-27 14:57:18
问题 This question already has answers here : Can I override the Javascript Function object to log all function calls? (6 answers) Closed 2 years ago . Is there a debugging system that allows me to record javascript function calls and their parameters as they occur? this would allow me to trace and debug applications in live/client situations without the performance hit due to manual logging. Edit: I'm not talking about manually calling functions using a 'console' window and viewing the results,

How to trace T-SQL function calls

浪子不回头ぞ 提交于 2019-11-27 14:30:43
问题 I'm trying to debug a rather complicated formula evaluator written in T-SQL UDFs (don't ask) that recursively (but indirectly through an intermediate function) calls itself, blah, blah. And, of course, we have a bug. Now, using PRINT statements (that can then be read from ADO.NET by implementing a handler for the InfoMessage event), I can simulate a trace for stored procedures. Doing the same for UDF results in a compile time message: Invalid use of side-effecting or time-dependent operator

convert curl call into java urlconnection call

折月煮酒 提交于 2019-11-27 14:13:14
问题 I have curl command: curl -i -u guest:guest -H "content-type:application/json" -XPUT \ http://localhost:15672/api/traces/%2f/my-trace \ -d'{"format":"text","pattern":"#"}' And I want to create HTTP Request in Java API which will do the same thing. This curl command can be found in this README. It is used to start recording log on RabbitMQ. Response is not important. For now I created something like this (I've deleted less important lines i.e. with catching exception etc.), but unfortunately

how to trace function call in C?

喜你入骨 提交于 2019-11-27 11:43:59
Without modifying the source code, how can i trace which functions are called and with what parameters, when some function(say func100 in the following example) is invoked. I would like the output to be as follows: enter func100(p1001=xxx,p1002=xxx) enter func110(p1101=xxx,p1102=xxx) exit func110(p1101=xxx,p1102=xxx) enter func120(p1201=xxx,p1202=xxx,p1203=xxx) enter func121(p1211=xxx) exit func121(p1211=xxx) exit func120(p1201=xxx,p1202=xxx,p1203=xxx) exit func100(p1001=xxx,p1002=xxx) is this doable? or what's the solution with minimum modification of source code? If you use gcc , you can use

Finding cause of deadlock error from oracle trace file

我的梦境 提交于 2019-11-27 11:43:59
问题 I have been getting this "ora-00060 deadlock detected while waiting for resource" error often now in my application when multiple users are using the application. I have got the trace file from the oracle Admin, but need help in reading it. Below is bits of data from the trace file, which i hope would help in locating the cause. *** 2013-06-25 09:37:35.324 DEADLOCK DETECTED ( ORA-00060 ) [Transaction Deadlock] The following deadlock is not an ORACLE error. It is a deadlock due to user error

Overriding System.Diagnostics.Trace.WriteLine to log to a file

╄→尐↘猪︶ㄣ 提交于 2019-11-27 11:34:18
问题 This may be more of an OOP concept question, but here's what I'd like to do. I have an application that outputs debug information using System.Diagnostics.Trace.WriteLine so it can be viewed with DebugView. I'd like to override/extend (not sure of the proper terminology) this method to log the text to a file instead, or maybe in addition to the Trace output. This would allow me to write a new WriteLine method for my app, and I could leave all my other System.Diagnostics.Trace.WriteLine

Xdebug trace GUI? [closed]

女生的网名这么多〃 提交于 2019-11-27 11:21:18
问题 I'm trying to find a GUI to parse and view Xdebug trace files . Although you can make them human readable, the sheer number of lines makes it unusable. I'm looking for something like KCachegrind but for a trace file. My main goal behind all this is to find what the memory hogs are. 回答1: I found this to be pretty solid. Maybe it's serviceable to you, too: https://github.com/corretge/xdebug-trace-gui 回答2: I found this one: xdebug trace file parser. 回答3: I just using started xdebug today came

NSNotificationCenter trapping and tracing all NSNotifications

夙愿已清 提交于 2019-11-27 09:18:18
问题 For some better understanding on what happens “under the hood”, I would love to do a complete trace of any notifications happening within my application. Naïve as I am, the first thing I tried was registering like this: Somewhere in my app: { [...] [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(traceNotifications:) name:nil object:nil]; [...] } - (void)traceNotifications:(NSNotification *)notification { NSLog(@"received notification %@", [notification name]); } I do