• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Log4j DailyRollingFileAppender problem

 
Ranch Hand
Posts: 64
Oracle Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody, I'm having some troubles with my application. I managed to implement log4j with a DailyRollingFileAppender which saves an XML Document in a server (Tomcat).

At the first deployment, my application and it log ran pretty good. It creates the xml file in /usr/share/tomcat6/logs/mylog.xml
Then I test my application and all the loggers save the data in the document. But then, when my partner deleted the file from the server. I thought that launching and deploying the application again, the xml log document was supposed to be created again and start appending the loggers since that moment. But the document never appeared in the folder. Other applications are running on the server, so I couldn't try to restart it. I wonder to know if it's something that has to do with the server, with my log configuration or a bug.

Please, I'll be grateful if you can help me with this. Thank you in advance.
 
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please check the path properly..May be there is some problem in the path.
After checking the path,deploy the application again.
 
Marcelo Tataje
Ranch Hand
Posts: 64
Oracle Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply, I think I know what the problem is... but what I don't know is how to solve it .

I work in NetBeans 6.9 IDE. And the Web application is actually a WebService. And, of course, I've created the Web Service Client to use operations of my WebService.

When I compile, deploy and run my webservice and then I compile, deploy and run my Client... I noticed that the logfile.xml is created on the path I specified /usr/share/tomcat6/logs/logfile.xml

But then I delete the log file in /usr/share/tomcat6/logs/logfile.xml

When I run the client again, the file is not being created. But when I right click on the client and debug instead of run, the file is being created. Is it a bug or do I have to include some special configuration in my client?

Thanks in advance for your help.
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry i am not sure about this,


When I compile, deploy and run my webservice and then I compile, deploy and run my Client... I noticed that the logfile.xml is created on the path I specified /usr/share/tomcat6/logs/logfile.xml[/qoute]

As you have compiler deploy and run both of your webservice and client,So your logfile.xml is created

But then I delete the log file in /usr/share/tomcat6/logs/logfile.xml



here you have deleted your file

When I run the client again, the file is not being created.


here why not you try to run the webservice again.


But when I right click on the client and debug instead of run, the file is being created. Is it a bug or do I have to include some special configuration in my client


When you say debug,you need to switch from normal to debug mode,so webservice will automatically get restarted.

So i will say why not you try to restart the webservice again and then run your client.

I hope this will be helpful

 
Marcelo Tataje
Ranch Hand
Posts: 64
Oracle Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah you're right, it works fine when I follow the steps you menctioned. Thank you very much for this information. I thought the log file was supposed to be created again when the webservice is invoked. Thanks!
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are welcome...
 
reply
    Bookmark Topic Watch Topic
  • New Topic