Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unsynchronized file reading

 
Anbarasu Ganesan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using WSAD,log4j for logging.If i want to see the log, I need to stop the server, then only I can open the log file. cos the log is locked by server. is there any solution in Java to read the log file, at the same time the server is running.

Thanks in advance
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you trying to use to open the log file? What OS are you using? Unix operating systems make such tasks very easy. VI, cat and tail all can be used on open files. If you are stuck with Windows try a programmer's editor like JEdit
 
Anbarasu Ganesan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
my application is running in WSAD Test Environment, the log file is written in /appn/sys/logs path. I need to see the log file content.
my OS is WINXP, whenever I try to open the log file using wordpad, it displays a message, file is been using by another application. So I should stop the server then I can see the log file.
What I am looking can I open the log file while the application running? is it possible?
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wordpad is not well-suited to any programming task.
JEdit will correctly handle open files, as will probably any other full-featured editor.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic