Log4j logfile incomplete












0















I searched but did not find a question like this...



This is my log4j properties file:



# This sets the global logging level and specifies the appenders
log4j.rootLogger=DEBUG, fileLog, consoleLog

#set text file appender configurations and use unique name for logFile
log4j.appender.fileLog = org.apache.log4j.RollingFileAppender
log4j.appender.fileLog.File = ${log.path}Any_Test_${current.date.time}.log
log4j.appender.fileLog.maxFileSize = 100MB
log4j.appender.fileLog.MaxBackupIndex=10
log4j.appender.fileLog.layout=org.apache.log4j.PatternLayout
log4j.appender.fileLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,mss} %-5p [anyTool] %c{2}:%L - %m%n

# Direct log messages to console
log4j.appender.consoleLog=org.apache.log4j.ConsoleAppender
log4j.appender.consoleLog.Target=System.out
log4j.appender.consoleLog.layout=org.apache.log4j.PatternLayout
log4j.appender.consoleLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,mss} %-5p [nds-tool-qa-asr] %c{2}:%L - %m%n
log4j.appender.consoleLog.Threshold = INFO


The issue occurred because I once had a log file which was too big for the current maxFileSize so there appeared 2 log files representing the whole content, but split up. To get everything into 1 log file again, I just decided to raise the maxFileSize up to 100MB.



The problem now is that I just get a small log (7,50MB), which only contains a part of the logging information - rest completely missing.



Are there typical things that can cause such loss?



Note: Everything worked out before, just changed the maxFileSize, so there cannot be errors in the java code or a wrong initialization of the properties file. (In my opinion)



Another note: The log file contains the complete "ending" so it seems that for any reason it is cutting off lines from the beginning of the document while new log entries come in.



Thanks in advance!










share|improve this question



























    0















    I searched but did not find a question like this...



    This is my log4j properties file:



    # This sets the global logging level and specifies the appenders
    log4j.rootLogger=DEBUG, fileLog, consoleLog

    #set text file appender configurations and use unique name for logFile
    log4j.appender.fileLog = org.apache.log4j.RollingFileAppender
    log4j.appender.fileLog.File = ${log.path}Any_Test_${current.date.time}.log
    log4j.appender.fileLog.maxFileSize = 100MB
    log4j.appender.fileLog.MaxBackupIndex=10
    log4j.appender.fileLog.layout=org.apache.log4j.PatternLayout
    log4j.appender.fileLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,mss} %-5p [anyTool] %c{2}:%L - %m%n

    # Direct log messages to console
    log4j.appender.consoleLog=org.apache.log4j.ConsoleAppender
    log4j.appender.consoleLog.Target=System.out
    log4j.appender.consoleLog.layout=org.apache.log4j.PatternLayout
    log4j.appender.consoleLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,mss} %-5p [nds-tool-qa-asr] %c{2}:%L - %m%n
    log4j.appender.consoleLog.Threshold = INFO


    The issue occurred because I once had a log file which was too big for the current maxFileSize so there appeared 2 log files representing the whole content, but split up. To get everything into 1 log file again, I just decided to raise the maxFileSize up to 100MB.



    The problem now is that I just get a small log (7,50MB), which only contains a part of the logging information - rest completely missing.



    Are there typical things that can cause such loss?



    Note: Everything worked out before, just changed the maxFileSize, so there cannot be errors in the java code or a wrong initialization of the properties file. (In my opinion)



    Another note: The log file contains the complete "ending" so it seems that for any reason it is cutting off lines from the beginning of the document while new log entries come in.



    Thanks in advance!










    share|improve this question

























      0












      0








      0








      I searched but did not find a question like this...



      This is my log4j properties file:



      # This sets the global logging level and specifies the appenders
      log4j.rootLogger=DEBUG, fileLog, consoleLog

      #set text file appender configurations and use unique name for logFile
      log4j.appender.fileLog = org.apache.log4j.RollingFileAppender
      log4j.appender.fileLog.File = ${log.path}Any_Test_${current.date.time}.log
      log4j.appender.fileLog.maxFileSize = 100MB
      log4j.appender.fileLog.MaxBackupIndex=10
      log4j.appender.fileLog.layout=org.apache.log4j.PatternLayout
      log4j.appender.fileLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,mss} %-5p [anyTool] %c{2}:%L - %m%n

      # Direct log messages to console
      log4j.appender.consoleLog=org.apache.log4j.ConsoleAppender
      log4j.appender.consoleLog.Target=System.out
      log4j.appender.consoleLog.layout=org.apache.log4j.PatternLayout
      log4j.appender.consoleLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,mss} %-5p [nds-tool-qa-asr] %c{2}:%L - %m%n
      log4j.appender.consoleLog.Threshold = INFO


      The issue occurred because I once had a log file which was too big for the current maxFileSize so there appeared 2 log files representing the whole content, but split up. To get everything into 1 log file again, I just decided to raise the maxFileSize up to 100MB.



      The problem now is that I just get a small log (7,50MB), which only contains a part of the logging information - rest completely missing.



      Are there typical things that can cause such loss?



      Note: Everything worked out before, just changed the maxFileSize, so there cannot be errors in the java code or a wrong initialization of the properties file. (In my opinion)



      Another note: The log file contains the complete "ending" so it seems that for any reason it is cutting off lines from the beginning of the document while new log entries come in.



      Thanks in advance!










      share|improve this question














      I searched but did not find a question like this...



      This is my log4j properties file:



      # This sets the global logging level and specifies the appenders
      log4j.rootLogger=DEBUG, fileLog, consoleLog

      #set text file appender configurations and use unique name for logFile
      log4j.appender.fileLog = org.apache.log4j.RollingFileAppender
      log4j.appender.fileLog.File = ${log.path}Any_Test_${current.date.time}.log
      log4j.appender.fileLog.maxFileSize = 100MB
      log4j.appender.fileLog.MaxBackupIndex=10
      log4j.appender.fileLog.layout=org.apache.log4j.PatternLayout
      log4j.appender.fileLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,mss} %-5p [anyTool] %c{2}:%L - %m%n

      # Direct log messages to console
      log4j.appender.consoleLog=org.apache.log4j.ConsoleAppender
      log4j.appender.consoleLog.Target=System.out
      log4j.appender.consoleLog.layout=org.apache.log4j.PatternLayout
      log4j.appender.consoleLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,mss} %-5p [nds-tool-qa-asr] %c{2}:%L - %m%n
      log4j.appender.consoleLog.Threshold = INFO


      The issue occurred because I once had a log file which was too big for the current maxFileSize so there appeared 2 log files representing the whole content, but split up. To get everything into 1 log file again, I just decided to raise the maxFileSize up to 100MB.



      The problem now is that I just get a small log (7,50MB), which only contains a part of the logging information - rest completely missing.



      Are there typical things that can cause such loss?



      Note: Everything worked out before, just changed the maxFileSize, so there cannot be errors in the java code or a wrong initialization of the properties file. (In my opinion)



      Another note: The log file contains the complete "ending" so it seems that for any reason it is cutting off lines from the beginning of the document while new log entries come in.



      Thanks in advance!







      java log4j






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 28 '18 at 13:01









      LeRoe93LeRoe93

      12




      12
























          0






          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',
          autoActivateHeartbeat: false,
          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%2f53520088%2flog4j-logfile-incomplete%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53520088%2flog4j-logfile-incomplete%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Lallio

          Futebolista

          Jornalista