Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 669611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:10:11+00:00 2026-05-14T00:10:11+00:00

We have a requirment which requires to have an Handler that is extended from

  • 0

We have a requirment which requires to have an Handler that is extended from Java logging and allows to have the files rotated on daily basis.

Currently Java util logging do have the support of rotation based on file size by using File Handler. It doesnt support rotation on daily basis. https://bugs.java.com/bugdatabase/view_bug?bug_id=6350749

So , what we are looking is for such an appender that allows daily rotation . We would like to write such handler and which is the appropriate handler to extend for … StreamHandler or FileHandler ?
And other questions are , is there way we can configure 2 different files for a single handler say FileHandler say for eg , we would like some kind of messages need to be captured in one file and other messages in other file.

Would appreciate for any comments.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:10:12+00:00Added an answer on May 14, 2026 at 12:10 am

    Log rotation – Tell management that Apache is one of the largest code houses in the world and I am sure there are millions of projects that use it. But since you have reiterated “Management decision” you could write your own FileHandler or use Java File handler, write your tasks, write the many hundred scenarios of tests (like quartz rolling the file when the handler is appending them)

    FileHander writing to two files – Either subclass the FileHandler (The filehandler should know when to send to these two files) But the prescribed solutions would be to use two actually different loggers with two different names with two appenders attached. A single java source can do logging to as many loggers as it wants, so

    class MyClass {
        Logger fileLogger = Logger.getLogger("something.mapped.to.file");
        Logger dbLogger = Logger.getLogger("something.mapped.to.db");
    
        public void someMethod() {
            dbLogger.log("XXX");
            fileLogger.log("YYY");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C# GUI application that references a Managed C++ project, which requires
I have a requirement in my app which requires me to display some message
So I have an application which requires very fast access to large volumes of
I have a requirement on my current project (a Flex app which will be
My requirement is to develop a page with 4 sections, which cannot have a
Applications which run on mobile devices have special user interface requirements. I think Apple
I have a system which I've been wrestling with for a while. Essentially, it
I have a Rails 2.3.5 project that uses the localization features of Rails. I
I have an xml file which describes (among other things) elements with attribute values
I have a question that doesn't need any specific answer, just a general direction

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.