[Tutor] Purging/deleting the logfile with the logging module
Kent Johnson
kent37 at tds.net
Wed Jan 31 04:30:08 CET 2007
Tony Cappellini wrote:
> > *close*( )
>
> >
> > Tidy up any resources used by the handler. This version does
> nothing
> > and is intended to be implemented by subclasses.
> >
> > How can I purge/delete & reopen the logfile?
>
> >>FileHandler has a close() method that presumably does something
> useful.
>
>
> see above-
> It says it does nothing, but it does close the file. This is the first step.
The docs for FileHandler.close() say, "Closes the file."
>
> Will see what the socket handler does.
I'm not suggesting that you use SocketHandler, only that the example on
that page might be useful. Use FileHandler instead of SocketHandler.
Kent
>
> thanks
>
>
>
>
>
More information about the Tutor
mailing list