[Tutor] Writing to a remote file

kieran flanagan kieran.flanagan at gmail.com
Sun Jun 18 21:11:35 CEST 2006


Hi

Thanks for the help. I took a quick scan through the logging module and I
can't see any mention of writing to a remote file ? Could you please direct
me to the part you mentioned ?. I went through some of the examples and the
one related to remote logging is via the console (tcp port). I cannot see
any information given regarding remote logging.
Just to give some more info on what I am doing. I have a large script that
is running and outputting messages to a logfile I am storing. I want these
messages to be output to a remote file instead which can be viewed on a
browser to provide realtime data as the script processes.
So this logfile is not handled by syslog.

This is being done on a Linux machine.

Thanks for the help
Kieran




On 6/16/06, Lloyd Kvam <lkvam at venix.com> wrote:
>
> On Fri, 2006-06-16 at 14:47 +0100, kieran flanagan wrote:
> > Hi
> >
> > I want to run a script on one machine and log output messages to a
> > remote file located on another machine. Is there any easy method of
> > doing this ?.
>
> http://docs.python.org/lib/module-logging.html
>
> If the remote machine is a file server, you can use the logging module
> to write to a file on the remote machine
>
> Also the logging module can be used to easily log to a syslog handler.
> If this remote file is a "normal" log file managed by a syslog process
> then you should find the python part pretty easy.  The syslog process
> still needs to be configured to accept your logging messages, but that
> should not be too difficult.
>
> Scanning the logging module docs, it looks like you can use it to write
> your own process to run on the remote machine to handle "logging
> messages".  Then use the logging module on the local machine to send
> "logging messages" to the remote machine.
>
>
> > Thanks
> > Kieran
> >
> > --
> > "Behind every great man, there is a great woman. Behind that woman is
> > Mr.T."
> > _______________________________________________
> > Tutor maillist  -  Tutor at python.org
> > http://mail.python.org/mailman/listinfo/tutor
> --
> Lloyd Kvam
> Venix Corp.
> 1 Court Street, Suite 378
> Lebanon, NH 03766-1358
>
> voice:  603-653-8139
> fax:    320-210-3409
>
>


-- 
"Behind every great man, there is a great woman. Behind that woman is Mr.T."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060618/6cb8343c/attachment.htm 


More information about the Tutor mailing list