trace

How to monitor MySQL query errors, timeouts and logon attempts? [closed]

人盡茶涼 提交于 2019-11-30 14:12:11
While setting up a third party closed source CMS (Sitefinity) the setup doesn't create all tables and procedures necessary to run it. The software lacks a logging system itself and it made me wonder: could I trace and monitor failing SQL statements from MySQL? This serves more than only the purpose of solving my issue with Sitefinity. More often I wonder what's send to the MySQL server, not wanting to dive into the software products or setup a debugging environment etc. I tried JetProfiler (only performance) and looked through a few others , but although they monitor a lot, they don't monitor

C# conditional logging/tracing

爷,独闯天下 提交于 2019-11-30 13:22:42
问题 I want to add logging or tracing to my C# application but I don't want the overhead of formatting the string or calculating values to be logged if the log verbosity level is set so low that the message will not be logged. In C++, you can use the preprocessor to define macros that will prevent code from being executed at all like this: #define VLOG(level,expr) if (level >= g_log.verbosity) { g_log.output << expr; } Used like this: VLOG(5,"Expensive function call returns " <<

How to trace code execution in PHP?

半腔热情 提交于 2019-11-30 13:00:21
问题 I would like to see a log of THE WHOLE code execution of PHP script(s). Something like this: http://en.wikibooks.org/wiki/Ruby_Programming/Standard_Library/Tracer (for lack of better example; no flame please). Is there some way how to obtain the log in PHP? Note: I know I can use a debugger but that's not the same. 回答1: Xdebug is definitely what you want, but with something like callgrind from the valgrind suite as well. Zend blog post here should give you some pointers: http://devzone.zend

Tracing methods execution time

心已入冬 提交于 2019-11-30 12:55:28
I am trying to "inject" custom tracing methods in my application. I want to make it as elegant as possible, without modifying to much of the existing code, and have the possibility to enable / disable it easily. One solution i could think of would be to create a custom Attribute which i will attach it to the methods i want to trace. Basic idea: public class MethodSnifferAttribute : Attribute { private Stopwatch sw = null; public void BeforeExecution() { sw = new Stopwatch(); sw.Start(); } public void ExecutionEnd() { sw.Stop(); LoggerManager.Logger.Log("Execution time: " + sw

wcf trying to set up tracing to debug, not writing to log file

点点圈 提交于 2019-11-30 12:18:36
here's my web.config, running a WCF service in an application on IIS7, but nothing is being written to the specified file. permission on the file has been granted for everyone. <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Information, ActivityTracing, error, warning, critical" propagateActivity="true"> <listeners> <add name="traceListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\log\tracestext.log" /> </listeners> </source> </sources> </system.diagnostics> I can add a service reference just fine. I then try to call the service from

WCF Tracing. How I can get the exact reason for closing connection?

自古美人都是妖i 提交于 2019-11-30 12:12:33
In my WCF service, when trying transfer large data I constantly get an error: The underlying connection was closed: The connection was closed unexpectedly I want to know what particular reason invokes this error, so I set up WCF Tracing and can read traces.svclog file. The problem is, that I can see in this file a lot of information about flow of processes, I can see exact time when exception is appeared, but I can't see the exact reason for that. Is it due to MaxReceivedMessageSize or something like that. Is it so that traces.svclog can not contain such information or am I doing something

Tracing versus Logging and how does log4net fit in?

亡梦爱人 提交于 2019-11-30 10:55:37
问题 I am wondering about what the difference between logging and tracing is. Is the difference basically that tracing is more detailed log giving developers a tool to debug applications at runtime? I have been experimenting with log4net and doing logging. Now I am wondering if I should be doing tracing as well and if I could/should use log4net for that purpose. Should I be doing tracing with log4net and is there some trace level for log4net loggers? Should I use a different log level for debug

How to get Javascript Function Calls/Trace at Runtime

ぃ、小莉子 提交于 2019-11-30 10:46:16
问题 As I interact with my AJAX based application at RUNTIME I'd like the console to spit out all the functions it's calling. (so no stack trace, or breakpoints, or profiling or anything) So for example, let's say I pressed a button on the page. I'd like for it to return all the functions it went through when that happened: So I'd see in the console something like (when I pressed a button): 1. button1Clicked(); 2. calculating(); 3. printingResults(); Which basically means that button1Clicked()

Is there a way to turn on tracing in perl (equivalent to bash -x)?

百般思念 提交于 2019-11-30 07:52:00
I have a system script in perl. I need some equivalent of bash -x to determine what is going wrong with the script. Is there something equivalent? EDIT: What bash -x does is that it prints each line as it is evaluated. This makes debugging code that is just missing some path variable or file very easy. Take a look at Devel::Trace or Devel::ebug . Given this program named w.pl : #!/usr/bin/perl use strict; use warnings; my $answer = 42; if ($answer == 6 * 9) { print "everything is running fine.\n"; } else { warn "there must be a bug somewhere...\n"; } You can use Devel::Trace to watch the

C# conditional logging/tracing

佐手、 提交于 2019-11-30 07:17:39
I want to add logging or tracing to my C# application but I don't want the overhead of formatting the string or calculating values to be logged if the log verbosity level is set so low that the message will not be logged. In C++, you can use the preprocessor to define macros that will prevent code from being executed at all like this: #define VLOG(level,expr) if (level >= g_log.verbosity) { g_log.output << expr; } Used like this: VLOG(5,"Expensive function call returns " << ExpensiveFunctionCall()); How do you do that in C#? I've read the Microsoft docs explaining the Trace and Debug