CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    21

    Question Help me with log files

    hi friends

    i am using log4net in my project.I have created log files based on the date.the log file name is the current date.i like to get the log files created within two specified dates.

    Am working on web application in ASP.NET using C#.

  2. #2
    Join Date
    May 2003
    Location
    Germany
    Posts
    936

    Re: Help me with log files

    Well, try to get all filenames. Then extract the date from the filename and convert to a datetime. After that you can check the date. If the date is within your date span you take the log file. If not you discard this one. So you should loop through all filenames and you have the right ones.

    It is a simple algorithm. Maybe there is a better one but it should work.
    Useful or not? Rate my posting. Thanks.

  3. #3
    Join Date
    Dec 2006
    Posts
    21

    Re: Help me with log files

    Thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured