logging

How do I write to the VB6 immediate window from C++ based COM object?

谁都会走 提交于 2020-01-17 05:04:32
问题 I have developed a C++ based COM object to use it in a VB6 application. Now I need to add some logging to catch some of the bugs. I discovered from the answer to 'How to debug COM object in Visual Studio 6.0' question that I can use the OutputDebugString function. But is it possible to write to the VB6 immediate window somehow? 回答1: Rather than attempting to write to the immediate window, it would be generally more useful to use DebugView from Sysinternals (now part of Microsoft technet):

how to log resteasy client request

﹥>﹥吖頭↗ 提交于 2020-01-17 04:18:18
问题 I need to know what is exactly the REST message body before sending it to client and also its response before processing, so I try to use Interceptors but unfortunately it is NOT working. @NameBinding public @interface DoIt {} @DoIt public class MyFilter implements ContainerRequestFilter {...} @Path("/root") public class MyResource { @GET @DoIt public String get() {...} } I can not use wireshark to capture http messages because my server only accept Https requests. I searched a lot and find

Restricting Tomcat logging in eclipse

戏子无情 提交于 2020-01-16 14:18:09
问题 Tomcat logges in eclipse everything starting with DEBUG. It doesn't log only its own properties but other stuff allow themselves to log (like: [localhost-startStop-1] DEBUG o.s.w.c.s.StandardServletEnvironment or [localhost-startStop-1] DEBUG o.s.c.i.s.PathMatchingResourcePatternResolver and many many others). I want to limit tomcat logging to info or warning. I tried going into the tomcat directory and changing the log level in logging.propertie from "FINE" to "INFO" to no avail. I even

Help with pointcut - AspectJ

假如想象 提交于 2020-01-16 14:03:19
问题 I'm just a bit confused with the parameters in a pointcut would appreciate if anyone could explain it to me... import Java.util.logging.*; import org.aspect j.lang.*; public aspect TraceAspect { private Logger _logger = Logger.getLogger("trace"); TraceAspectV2() { _logger.setLevel(Level.ALL); } pointcut traceMethods() (execution(* Account.*(..)) || execution(*.new(..))) && !within(TraceAspect); before () : traceMethods() { if (_logger.isLoggable(Level.INFO)) { Signature sig =

Should we use isDebugEnabled() while logging calculated data with Logback?

本秂侑毒 提交于 2020-01-16 08:36:07
问题 Although in some tutorials, for example here ( Parametrized logging section), said that Logback message {} parametrization help us to avoid unnecessary calculation in logging data (if logging level is not DEBUG): logger.debug("The bonus for employee {} is {}", employee.getName(), employeeService.calculateBonus(employee)); I tested (on logback version 1.2.3 ) that this optimization works only for unnecessary toString() of parameter object - as this works for log4j . Logback documentation doesn

“Debug”(get information) on a running stored procedure in MS Sql Server

烂漫一生 提交于 2020-01-16 06:06:05
问题 i aked myself if it is possible in MS SQL-Server 2005 to get information of a running stored procedure. Because meanwhile it is executing for more than 8 hours, i would like to know on what step it is or if it is even actually running at all. MS SSMS says that it is still executing the query. Thanks in advance, Tim 回答1: sql Profiler can help you: http://www.databasejournal.com/features/mssql/article.php/3750161/Introduction-to-SQL-2005-Profiler-Part-1.htm 回答2: Use Print statements? Update a

very specific substring retrieval and split

半腔热情 提交于 2020-01-16 05:27:09
问题 i know there are tons of posts about sub-stringing, believe me i have searched through many of them looking for an answer to this. i have many strings, lines from a log, and i am trying to categorize and parse them. they look something like this: /long/file/name/with.dots.and.extension:Jan 01 12:00:00 TYPE Static Message;Dynamic Message where the filename is the file where the log is located, the date is the date/time that the message was put into the log, and the TYPE is the type of message,

log4j2 extending Logger class

我的梦境 提交于 2020-01-16 05:25:26
问题 I am trying to migrate from Log4j 1.7 to Log4j2.4 In 1.7, I as creating AppLogger class by extending org.apache.log4j.Logger and using extending debug/error/fatal Methods e.g., public void error(Object message) { Object error = message; if (message instanceof Exception) { Exception e = (Exception) message; StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); error = sw.toString(); } super.error(error); } But in Log4j 2.x, I am not able to extend the class org.apache

Python Logging: Group logs which belong to one request

荒凉一梦 提交于 2020-01-16 00:56:31
问题 Is there a way to group logs of a python web application which belong to one web request? Example: 2015-02-11 13:06:32 myapp.middleware.MYAPPMiddleware: INFO Login of user foo was successful 2015-02-11 13:06:32 myapp.middleware.MYAPPMiddleware: INFO Login of user bar failed 2015-02-11 13:06:32 myapp.send_mails: INFO failed to send mail to someone@example.com The above log lines are unrelated to each other. How can you solve this the pythonic way? 回答1: Log entries in their essence are designed

Change save path of PHP interactive shell history

不羁岁月 提交于 2020-01-16 00:56:16
问题 I once found a way to disable session logging by php -a , php's interactive shell. How do I turn it back on? Is there a way to send logging to another, file besides ~/.php_history ? I think I may have sent the output to /dev/null . edit: It apparently still saves to the .php_history file. It doesn't save until you exit completely from the shell. I would still like to know how move the history logging to another file. 回答1: No, currently (5.3.10 ubuntu) the filename ~/.php_history is hardcoded