Hi I have the my log4 Perl configuration file as below, Here I have done the changes to conf file to create the new log file every day automatically. But still it's writing to the same existing file even the date get change. So please let me know anything else conf changes i need to do get created the new log file every day when date got changed



[log4perl] log4perl.logger=WARN,Logfile #log4perl.threshold = OFF##switch off all loggers #log4perl.appender.Logfile = Log::Log4perl::Appender::File log4perl.appender.Logfile = Log::Dispatch::FileRotate log4perl.appender.Logfile.filename = sub { return get_log(); } #log4perl.appender.Logfile.recreate = 1 log4perl.appender.Logfile.mode = append #log4perl.appender.Logfile.size = 15728640 ##15MB log4perl.appender.Logfile.max = 2 log4perl.appender.Logfile.DatePattern = yyyy-MM-dd #log4perl.appender.Logfile.additivity =0 log4perl.appender.Logfile.layout = Log::Log4perl::Layout::PatternLayou +t log4perl.appender.Logfile.layout.ConversionPattern = %d %p> %m%n #log4perl.appender.Logfile.layout.ConversionPattern = %d %p> %F{1}:%L +%M - %m%n log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Screen.layout.ConversionPattern = %d %p> %m%n [Modules level setup]
.
.
.
.
.
.
.
.
.

In reply to How can I roll over my logfiles automatically at midnight? by shree

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.