Same content is being logged into Application and Selenium log files
up vote
0
down vote
favorite
I've written the log4j.properties file as below.
#Root Logger option
log4j.rootLogger = debug, file
log4j.appender.file = org.apache.log4j.RollingFileAppender
log4j.appender.file.File = C:\Users\user\eclipse-
workspace\DataDrivenFrameworkMaven\src\test\resources\logs\Selenium.log
log4j.appender.file.maxFileSize = 5000KB
log4j.appender.file.maxBackupSize = 1
log4j.appender.file.layout = org.apache.log4j.PatternLayout
log4j.appender.file.layout.conversionPattern = %d{ABSOLUTE} %5p %c{1}:%L -
%m%n
#Do not append the old file. Create a new log file everytime
log4j.appender.file.Append = false
#Application Logs
log4j.logger.devpinoyLogger = DEBUG, dest1
log4j.appender.dest1 = org.apache.log4j.RollingFileAppender
log4j.appender.dest1.File= C:\Users\user\eclipse-workspace\DataDrivenFrameworkMaven\src\test\resources\logs\Application.log
log4j.appender.dest1.maxFileSize = 5000KB
log4j.appender.dest1.maxBackupIndex = 3
log4j.appender.dest1.layout = org.apache.log4j.PatternLayout
log4j.appender.dest1.conversionPattern = %d{dd/MM/yyyy HH:mm:ss} %c %m%n
#Do not append the old file. Create a new file every time
log4j.appender.dest1.Append = false
The output in both the files Application.log and Selenium.log is as below.
Application.log:
Config file is loaded.
OR file is loaded.
Chrome browser is launched.
Navigted to http://www.way2automation.com/angularjs-
protractor/banking/#/login
Inside Login Test
Login Test successfully executed
Test execution completed
10:29:47,478 DEBUG devpinoyLogger:40 - Config file is loaded.
10:29:47,481 DEBUG devpinoyLogger:53 - OR file is loaded.
10:29:50,057 DEBUG devpinoyLogger:61 - Chrome browser is launched.
10:29:55,657 DEBUG devpinoyLogger:74 - Navigted to
http://www.way2automation.com/angularjs-protractor/banking/#/login
10:29:55,699 DEBUG devpinoyLogger:13 - Inside Login Test
10:29:55,801 DEBUG devpinoyLogger:16 - Login Test successfully executed
10:29:56,604 DEBUG devpinoyLogger:87 - Test execution completed
As you can see, the output is the same in both the files which isn't supposed to be the case. Every request the script sends should be logged in the Selenium.log. Instead, the manual logging information is being saved in the Selenium.log.
selenium automation webdriver log4j
add a comment |
up vote
0
down vote
favorite
I've written the log4j.properties file as below.
#Root Logger option
log4j.rootLogger = debug, file
log4j.appender.file = org.apache.log4j.RollingFileAppender
log4j.appender.file.File = C:\Users\user\eclipse-
workspace\DataDrivenFrameworkMaven\src\test\resources\logs\Selenium.log
log4j.appender.file.maxFileSize = 5000KB
log4j.appender.file.maxBackupSize = 1
log4j.appender.file.layout = org.apache.log4j.PatternLayout
log4j.appender.file.layout.conversionPattern = %d{ABSOLUTE} %5p %c{1}:%L -
%m%n
#Do not append the old file. Create a new log file everytime
log4j.appender.file.Append = false
#Application Logs
log4j.logger.devpinoyLogger = DEBUG, dest1
log4j.appender.dest1 = org.apache.log4j.RollingFileAppender
log4j.appender.dest1.File= C:\Users\user\eclipse-workspace\DataDrivenFrameworkMaven\src\test\resources\logs\Application.log
log4j.appender.dest1.maxFileSize = 5000KB
log4j.appender.dest1.maxBackupIndex = 3
log4j.appender.dest1.layout = org.apache.log4j.PatternLayout
log4j.appender.dest1.conversionPattern = %d{dd/MM/yyyy HH:mm:ss} %c %m%n
#Do not append the old file. Create a new file every time
log4j.appender.dest1.Append = false
The output in both the files Application.log and Selenium.log is as below.
Application.log:
Config file is loaded.
OR file is loaded.
Chrome browser is launched.
Navigted to http://www.way2automation.com/angularjs-
protractor/banking/#/login
Inside Login Test
Login Test successfully executed
Test execution completed
10:29:47,478 DEBUG devpinoyLogger:40 - Config file is loaded.
10:29:47,481 DEBUG devpinoyLogger:53 - OR file is loaded.
10:29:50,057 DEBUG devpinoyLogger:61 - Chrome browser is launched.
10:29:55,657 DEBUG devpinoyLogger:74 - Navigted to
http://www.way2automation.com/angularjs-protractor/banking/#/login
10:29:55,699 DEBUG devpinoyLogger:13 - Inside Login Test
10:29:55,801 DEBUG devpinoyLogger:16 - Login Test successfully executed
10:29:56,604 DEBUG devpinoyLogger:87 - Test execution completed
As you can see, the output is the same in both the files which isn't supposed to be the case. Every request the script sends should be logged in the Selenium.log. Instead, the manual logging information is being saved in the Selenium.log.
selenium automation webdriver log4j
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've written the log4j.properties file as below.
#Root Logger option
log4j.rootLogger = debug, file
log4j.appender.file = org.apache.log4j.RollingFileAppender
log4j.appender.file.File = C:\Users\user\eclipse-
workspace\DataDrivenFrameworkMaven\src\test\resources\logs\Selenium.log
log4j.appender.file.maxFileSize = 5000KB
log4j.appender.file.maxBackupSize = 1
log4j.appender.file.layout = org.apache.log4j.PatternLayout
log4j.appender.file.layout.conversionPattern = %d{ABSOLUTE} %5p %c{1}:%L -
%m%n
#Do not append the old file. Create a new log file everytime
log4j.appender.file.Append = false
#Application Logs
log4j.logger.devpinoyLogger = DEBUG, dest1
log4j.appender.dest1 = org.apache.log4j.RollingFileAppender
log4j.appender.dest1.File= C:\Users\user\eclipse-workspace\DataDrivenFrameworkMaven\src\test\resources\logs\Application.log
log4j.appender.dest1.maxFileSize = 5000KB
log4j.appender.dest1.maxBackupIndex = 3
log4j.appender.dest1.layout = org.apache.log4j.PatternLayout
log4j.appender.dest1.conversionPattern = %d{dd/MM/yyyy HH:mm:ss} %c %m%n
#Do not append the old file. Create a new file every time
log4j.appender.dest1.Append = false
The output in both the files Application.log and Selenium.log is as below.
Application.log:
Config file is loaded.
OR file is loaded.
Chrome browser is launched.
Navigted to http://www.way2automation.com/angularjs-
protractor/banking/#/login
Inside Login Test
Login Test successfully executed
Test execution completed
10:29:47,478 DEBUG devpinoyLogger:40 - Config file is loaded.
10:29:47,481 DEBUG devpinoyLogger:53 - OR file is loaded.
10:29:50,057 DEBUG devpinoyLogger:61 - Chrome browser is launched.
10:29:55,657 DEBUG devpinoyLogger:74 - Navigted to
http://www.way2automation.com/angularjs-protractor/banking/#/login
10:29:55,699 DEBUG devpinoyLogger:13 - Inside Login Test
10:29:55,801 DEBUG devpinoyLogger:16 - Login Test successfully executed
10:29:56,604 DEBUG devpinoyLogger:87 - Test execution completed
As you can see, the output is the same in both the files which isn't supposed to be the case. Every request the script sends should be logged in the Selenium.log. Instead, the manual logging information is being saved in the Selenium.log.
selenium automation webdriver log4j
I've written the log4j.properties file as below.
#Root Logger option
log4j.rootLogger = debug, file
log4j.appender.file = org.apache.log4j.RollingFileAppender
log4j.appender.file.File = C:\Users\user\eclipse-
workspace\DataDrivenFrameworkMaven\src\test\resources\logs\Selenium.log
log4j.appender.file.maxFileSize = 5000KB
log4j.appender.file.maxBackupSize = 1
log4j.appender.file.layout = org.apache.log4j.PatternLayout
log4j.appender.file.layout.conversionPattern = %d{ABSOLUTE} %5p %c{1}:%L -
%m%n
#Do not append the old file. Create a new log file everytime
log4j.appender.file.Append = false
#Application Logs
log4j.logger.devpinoyLogger = DEBUG, dest1
log4j.appender.dest1 = org.apache.log4j.RollingFileAppender
log4j.appender.dest1.File= C:\Users\user\eclipse-workspace\DataDrivenFrameworkMaven\src\test\resources\logs\Application.log
log4j.appender.dest1.maxFileSize = 5000KB
log4j.appender.dest1.maxBackupIndex = 3
log4j.appender.dest1.layout = org.apache.log4j.PatternLayout
log4j.appender.dest1.conversionPattern = %d{dd/MM/yyyy HH:mm:ss} %c %m%n
#Do not append the old file. Create a new file every time
log4j.appender.dest1.Append = false
The output in both the files Application.log and Selenium.log is as below.
Application.log:
Config file is loaded.
OR file is loaded.
Chrome browser is launched.
Navigted to http://www.way2automation.com/angularjs-
protractor/banking/#/login
Inside Login Test
Login Test successfully executed
Test execution completed
10:29:47,478 DEBUG devpinoyLogger:40 - Config file is loaded.
10:29:47,481 DEBUG devpinoyLogger:53 - OR file is loaded.
10:29:50,057 DEBUG devpinoyLogger:61 - Chrome browser is launched.
10:29:55,657 DEBUG devpinoyLogger:74 - Navigted to
http://www.way2automation.com/angularjs-protractor/banking/#/login
10:29:55,699 DEBUG devpinoyLogger:13 - Inside Login Test
10:29:55,801 DEBUG devpinoyLogger:16 - Login Test successfully executed
10:29:56,604 DEBUG devpinoyLogger:87 - Test execution completed
As you can see, the output is the same in both the files which isn't supposed to be the case. Every request the script sends should be logged in the Selenium.log. Instead, the manual logging information is being saved in the Selenium.log.
selenium automation webdriver log4j
selenium automation webdriver log4j
asked 2 days ago
learningQA
569
569
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53184031%2fsame-content-is-being-logged-into-application-and-selenium-log-files%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password