0

What I am trying to achieve here is being able to check the logs without closing the server. So I have written my server in python and I am able to use logging in python. But I can only see the logs once I close the server. Is there any way I can see the logs as when it is updated. Like I open the log file and I can see the logs of things that have happened and the server can contiue doing its work.

Thanks for the help.

Basic
  • 26,321
  • 24
  • 115
  • 201
user3089927
  • 3,575
  • 8
  • 25
  • 33
  • 2
    How are you logging? Show us a line of code that logs something. – Blorgbeard Jun 24 '14 at 01:21
  • See: http://stackoverflow.com/questions/16633911/does-python-logging-flush-every-log – Blorgbeard Jun 24 '14 at 01:22
  • Please [don't add a signature](http://meta.stackexchange.com/a/5038/135956). Consider changing your username instead... That's what it's for. See also [this answer](http://meta.stackexchange.com/a/3021/135956) about Hi/Thanks/etc – Basic Jun 24 '14 at 01:23
  • @Blorgbeard- currently what I am doing is: with open(FILE_NAME,"a") as logger: /* all the things to log in between */ logger.write("Server starting") . SO, when you will stop the server, log file is getting created with all the logs. But Can I open the log file anytime and see the logs. I am stuck with this. Also, I tried using logging package of python but that did not help either. – user3089927 Jun 24 '14 at 16:25

0 Answers0