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.










share|improve this question


























    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.










    share|improve this question
























      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.










      share|improve this question













      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      learningQA

      569




      569





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          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





































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          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




















































































          Popular posts from this blog

          横浜市

          Rostock

          Europa