logging

Usage of P6Spy with datasource in Spring applicationContext.xml

萝らか妹 提交于 2019-12-30 05:10:13
问题 I am using Hibernate 4, Spring 3, JSF 2.0 and Weblogic 10.3.6 as server. I have created datasource on Weblogic server and in applicationContext.xml I have defined datasource as <!-- Data Source Declaration --> <bean id="DataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="jdbc/​myDS"/> </bean> If I would want to use the P6Spy for logging SQL parameters, how can and where I should add the following in applicationcontext.xml? <property name=

How can you find what URL was used in log4j default initialization?

烈酒焚心 提交于 2019-12-30 05:09:22
问题 Log4j default initialization goes through a procedure to find and use a URL to configure with. Afterward, how can you find out what URL was ultimately used, without having to code the same procedure yourself? (If you have to code it yourself, you might not get it exactly the same as log4j does, and also it might change in a future release.) 回答1: If you are willing to use AspectJ LTW (load-time weaving), you can take a look at the static initialisation of LogManager mentioned by Ian Roberts.

How do I programmatically tell Logback to Reload Configuration

这一生的挚爱 提交于 2019-12-30 03:59:43
问题 I know there's a reloadDefaultConfiguration() jmx operation, but without getting an instance of MBean and invoking this operation, is there a Logback api to reload the default configuration (optionally specifying a log configuration file path)? 回答1: This is the source code of JMXConfigurator.reloadDefaultConfiguration() : public void reloadDefaultConfiguration() throws JoranException { ContextInitializer ci = new ContextInitializer(loggerContext); URL url = ci

How to log all headers in nginx?

本小妞迷上赌 提交于 2019-12-30 03:40:08
问题 How do I log all the headers the client (browser) has sent in Nginx? I also want to log the response headers. Note that I am using nginx as reverse proxy. After going through documentation, I understand that I can log a specific header, but I want to log all of the headers. 回答1: After much research, I can conclude that it is not possible out of the box. Update- you can use openresty which comes with Lua. Using Lua one can do pretty cool things, including logging all of the headers to say,

Where can I write my log4net log file to under ClickOnce?

允我心安 提交于 2019-12-30 03:18:48
问题 When I run my application locally it writes my log4net log to the location I've configured (i.e., <file value="${LOCALAPPDATA}\TEST\Logs\debug.log" /> ) without a problem. However, when I deploy my application via ClickOnce, the log file is not being written. I know ClickOnce applications are limited in terms of where they can write to, but I was under the impression that LOCALAPPDATA (e.g., C:\Users\me\AppData\Local) was fair game. Any ideas? 回答1: Isolated Storage. 回答2: With ClickOnce, the

Logging Spring using Log4j2

こ雲淡風輕ζ 提交于 2019-12-30 02:43:11
问题 I'm trying to use Log4j2 to print the spring logs into a file and console. I guess it is a problem in my Log4j2 configuration. I have not been able to get it working. I have this configuration in my log4j2.xml file: <?xml version="1.0" encoding="UTF-8"?> <configuration name="defaultConfiguration" status="warn" strict="true" monitorInterval="5"> <properties> <property name="patternlayout">%d{ISO8601} [%t] %-5level %logger{36} - %msg%n%throwable{full}</property> <property name="filename">${env

How to use nestjs Logging service

大城市里の小女人 提交于 2019-12-30 02:40:07
问题 I tried to use the internal Logger of nestjs (described on https://docs.nestjs.com/techniques/logger -> but with no description of how to use it) But I had problems (tried to inject LoggerService and so on) Can anybody explain how to do this? 回答1: Best practise Better than accessing the Logger statically is to create an instance for your class: @Controller() export class AppController { private readonly logger = new Logger(AppController.name); @Get() async get() { this.logger.log('Getting

how to see phonegap javascript log messages on xcode console

佐手、 提交于 2019-12-30 02:36:12
问题 I am trying to develop a basic hello world application with phonegap on Xcode. But i can not see the log messages on Xcode console. I have tried console.log and debug.log but they did not worked for me? How can i see javascript log messages on xcode console? 回答1: In Phonegap 3.0 you have to add a plugin for console.log to work in the xcode console. $ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git More info: http://docs.phonegap.com/en/edge/guide

GAE/J request log format breakdown

喜你入骨 提交于 2019-12-30 02:18:09
问题 Here is a sample of GAE Console log record: http://i.stack.imgur.com/M2iJX.png for readable high res version. I would like to provide a breakdown of the fileds, displayed both in the collpased (summary) view and the expended (detail) view. I will fill the fields I know their meaning and would appreciate assistannce with dichipering the rest. This post will be updated once new information is available. Thank you, Maxim. Open issues: How to read timestamp? [...-prod/0-0-39. 346862139187007139 ]

Jetty: how to disable logging?

给你一囗甜甜゛ 提交于 2019-12-30 01:53:29
问题 I am trying to embed Jetty 6.1 in another program. Jetty is dumping INFO-log information and I need to turn it off. Is there a simple way to disable logging programmaticaly? 回答1: A more concise version of Jeff Chern's answer: org.eclipse.jetty.util.log.Log.setLog(new NoLogging()) . import org.eclipse.jetty.util.log.Logger; public class NoLogging implements Logger { @Override public String getName() { return "no"; } @Override public void warn(String msg, Object... args) { } @Override public