In our install4j Auto updater we are facing some problems and we are trying to find out more information from the log file i4j_log_xxx from the Users/Temp folder.
The contents inside this file start with the follwing log level [INFO]....
[INFO] logger started at Thu Nov 25 19:34:10 CET 2021
The question for me is how to change the log level from INFO to DEBUG?. Or is this even possible via arguments?. From the install4j documentation, I was not able to find any information on the log level changes.
It is not possible to change the log level. All messages are logged, their severity is displayed as [INFO] or [ERROR], but there is no filter.
Related
Nothing happens after clicking on the web element. I have even print the statement after the click operation which is executed correctly but after that is is failing as click operation is not changing the object state.
Steps to reproduce -
create a selenium script to load google home page.
click on the I'm feeling Lucky button`enter code here.
it should load the doodle page.
When I run this script on my local machine, it worked fine. Now i have created an executable jar file using maven and eclipse to run my test suit and downloaded this jar on my remote desktop machine on server with all the necessary dependent files.
When I run the test using CMD java -jar "test-suit.jar".
It is opening IE browser successfully and load the url . It is clicking on I'm feeling lucky but it does not load doodle page after click and test fails . no error is given just i got this log:
log4j:WARN No appenders could be found for logger (org.apache.http.client.protoc
ol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more in
fo.
Sep 20, 2018 7:28:39 AM io.github.bonigarcia.wdm.WebDriverManager getDriversFrom
Xml
INFO: Reading https://selenium-release.storage.googleapis.com/ to seek IEDriverS
erver
Sep 20, 2018 7:28:40 AM io.github.bonigarcia.wdm.WebDriverManager getLatest
INFO: Latest version of IEDriverServer is 3.14
Sep 20, 2018 7:28:40 AM io.github.bonigarcia.wdm.Downloader checkBinary
INFO: Using binary driver previously downloaded
Sep 20, 2018 7:28:40 AM io.github.bonigarcia.wdm.WebDriverManager exportDriver
INFO: Exporting webdriver.ie.driver as C:\Users\debolin.dhar.m2\repository\webd
river\IEDriverServer\Win32\3.14\IEDriverServer.exe
null
true
null
false
Started InternetExplorerDriver server (32-bit)
3.14.0.0
Listening on port 24032
Only local connections are allowed
Sep 20, 2018 7:28:47 AM org.openqa.selenium.remote.ProtocolHandshake createSessi
on
INFO: Detected dialect: W3C
true
false
clicked on I'm feeling lucky
doodle Page doesn't exist
===============================================
Suite
Total tests run: 4, Failures: 1, Skips: 1
I don't understand what could be the error. Whether it is not clicking and not throwing any error also or I need to take certain additional settings to be set on my server machine or change in my script to get it work.
After I ran Drools as a java application in Eclipse ,the console displayed:
......
INFO: Found kmodule: file:/D:/eworkspace/DroolsBasicsMavenWay/target/classes/META-INF/kmodule.xml
Jun 06, 2018 5:19:54 PM org.drools.compiler.kie.builder.impl.ClasspathKieProject getPomPropertiesFromFileSystem
WARNING: Unable to find pom.properties in /D:/eworkspace/DroolsBasicsMavenWay/target/classes
Jun 06, 2018 5:19:54 PM org.drools.compiler.kie.builder.impl.ClasspathKieProject
......
Drools 6.2.0.Final, topic level is null
Drools 6.2.0.Final, topic level is null
Drools 6.2.0.Final, topic level is Beginner
My question is how to remove the the INFO and WARNING debugging information with Drool application in Eclipse and I only want the last three lines.
Sorry,I am new to Drools, and thank you for your help.
I made a .war file that prints strings to the console when I run in cmd
java -jar print.war
However, when I deploy this .war file to tomcat 8 by copying the file into the webapps folder:
C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps
I get this error whenever I go to http://localhost:8080/print
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Mon Dec 19 14:36:59 CST 2016
There was an unexpected error (type=Not Found, status=404).
No message available
Does that mean my deployment failed? Or is there something wrong with my .war file?
Thanks.
In order to process http request you need to specify a class that extends javax.servlet.http.HttpServlet and provide a deployment descriptor to let your servlet container know where should it delegate specific request.
If those terms are new to you, visit: https://www.tutorialspoint.com/servlets/ for more informations.
I'm trying to use Spring. A dependency of Spring is
So I have added commons-logging-1.1.1.jar to my build path. This all works fine. And I get stuff like this:
Feb 28, 2013 2:40:39 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext#c63a8af: startup date [Thu Feb 28 14:40:39 GMT 2013]; root of context hierarchy
This is all great but I don't want this printed to my standard out, I would prefer it to be sent to a file.
DirectoryStructure:
project
src
com.myproject.classes
myspring.xml
log4j.properties
test
com.myproject.classes
logs
myproject.log
So I would like to get all logs redirected from the standard out to the log file instead. Is this possible with Spring?
I've used the properties file from here: http://www.tutorialspoint.com/spring/logging_with_log4j.htm,
where I got my Spring example from. But this doesn't seem to make any difference. I've added some rubbish in there too to see if any exceptions get thrown, but nothing. I've tried moving the file around to different directories, but it still doesn't work.
Here it is:
# Define the root logger with appender file
log4j.rootLogger = DEBUG, FILE
# Define the file appender
log4j.appender.FILE=org.apache.log4j.FileAppender
# Set the name of the file
log4j.appender.FILE.File=logs/myproject.log
# Set the immediate flush to true (default)
log4j.appender.FILE.ImmediateFlush=true
# Set the threshold to debug mode
log4j.appender.FILE.Threshold=debug
# Set the append to false, overwrite
log4j.appender.FILE.Append=false
# Define the layout for file appender
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.conversionPattern=%m%n
Anyone got any ideas?
Thanks in advance.
Try this configuration : http://forum.springsource.org/showthread.php?94000-org-springframework-util-Log4jConfigurer-is-overriding-my-log4j-xml
Read the configuration class: http://static.springsource.org/spring/docs/1.1.x/api/org/springframework/util/Log4jConfigurer.html
For source code of Log Configuration - go through this :
http://git.springsource.org/sandbox/cbeams/blobs/bb96df1ed8e3720f33353824b108104027289e5c/org.springframework.core/src/main/java/org/springframework/util/Log4jConfigurer.java
I'm trying to debug some hibernate functionality in a spring app with a junit test and commons logging, but I can't seem to get anything other than the default INFO messages to appear. I'm also running these junit tests from Eclipse.
I've had no luck from the spring forums either.
I'm particularly interested in the debug logging output by Hibernate (to try and figure out why it takes 23 seconds to run this test).
Current output shows the default setting of INFO:
Mar 29, 2011 4:44:35 PM org.springframework.test.AbstractTransactionalSpringContextTests onSetUp
INFO: Began transaction: transaction manager [org.springframework.orm.hibernate3.HibernateTransactionManager#5f873eb2]; defaultRollback true
testGetSubjectsForSite time: [00:00:00:068]
Mar 29, 2011 4:44:58 PM org.springframework.test.AbstractTransactionalSpringContextTests endTransaction
INFO: Rolled back transaction after test execution
I've tried to add a commons-logging.properties file to the classpath (the same location as the hibernate.properties and test-components.xml) but still only the default INFO messages appear.
Here's the commons-logging.properties file:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
# handlers
handlers=java.util.logging.ConsoleHandler
# default log level
.level=FINE
org.springframework.level=FINE
org.hibernate.level=FINE
# level for the console logger
java.util.logging.ConsoleHandler.level=FINE
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
Is anyone able to shed any light on why I can't get the DEBUG messages to print out? Is there a logging setting I'm missing?
Edit: I've tried FINEST and DEBUG to no avail.
Unfortunately, it seems the logging configuration file used by Jdk14Logger should be specified at runtime.
See the following file in your JDK directory: JDK_HOME/jre/lib/logging.properties (it's the default one used if no config file is found)
Moreover, the file path should be absolute, otherwise it's relative to the folder where the JRE is executed - see the code of java.util.logging.LogManager.readConfiguration()
Also see:
http://www.javapractices.com/topic/TopicAction.do?Id=143
http://cyntech.wordpress.com/2009/01/09/how-to-use-commons-logging/
Your default and hibernate logging is at Level "FINE" which is more of a "INFO" in log4j terms.
You need set DEBUG level for org.hibernate which in JDK logging is equal to 'FINEST'
Set
org.hibernate.level=FINEST (in the above log which should enable debug logs)