Howdy, It's not a stupid question, but (without knowing better) it seems like a stupid requirement.
Since you're already using a custom appender, why not modify it to "touch" i.e. create the log file in its activateOptions method? Better yet, add a configurable option to create an empty file. It may be more of a java.io issue then (maybe open the file, write an empty string to it, flush the writer?). Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Stefan Hellwig [mailto:[EMAIL PROTECTED] >Sent: Wednesday, September 10, 2003 4:47 AM >To: [EMAIL PROTECTED] >Subject: Can I create empty log files (without logging events)? > >Hi! > >First, let me say that I'm very, very new to log4j and all, so the >following >question(s) might sound "stupid" to you - in that case please forgive me. > >The challange that I'm facing right now it this: I'll have to make some >changes to an application I know virtually nothing about - someone at my >company thought this would be a "good idea"... > >That appliation is using log4j and a ConfigurableDailyRollingFileAppender >which is derived from DailyRollingFileAppender. Now, this works in >general... > >BUT... now they want me to change the logging behavior in a way that the >logging system generates log files even when there are NO logging events >(when the system wasn't doing anything). These files will of course be >empty >(in a shell I would do a "touch" and that's it) and - in other words - >completely useless. That's what I told them also but they still want to >have >it. Is there any way to get log4j to generate empty log files even without >any logging events? > >By the way, these log files have to be generated every two minutes - even >if >they are empty... Any ideas? I mean I could also set up a cron job that >generates empty files every two minutes but I doubt that I'll get this in >sync with log4j. > >Thank you very much in advance for answering my "stupid" question. > >Regards, Stefan. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]