Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Reading log file w/out stopping tomcat

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am running Tomcat 5.x on a winXP box. I want to read the stderro and stdout logs when Tomcat is running. I get a file is in use error, unless I stop Tomcat.
Is there anyway around this? Its making debuging a pain.
Thanks,
Aaron R>
 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use Log4j from apache
You can easily format the output of the trace message and put the log file(e.g. debug.log) anywhere you want. No sharing problem happens.
Hope it help.
Dan
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the other thing you (should) be able to do is install software like cygwin which gives you all sorts of unix-like abilites in Windows. Of most interest to you is "tail -f", which allows you to see real-time additions to any file.

I've done this in the past and it has worked. Mind you, that was with Tomcat 4.x. Also, I have no problems having stderr open in Textpad and having Tomcat 4.x running at the same time. Whenever I switch to Textpad from my browser, it asks if I want to reload the file, because something else has updated it. This is on Windows 2k/XP Pro. So maybe there is something different about Tomcat 5.x.

I *have* had problems deleting or copying over jar files in the WEB-INF/lib or common/lib directories on Windows whilst Tomcat was running, but never the log files.
 
Do not set lab on fire. Or this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic