[Twisted-Python] Logging to both console and file (using twisted logging API)?
naman jain
namanvit at gmail.com
Thu Nov 5 06:20:41 MST 2009
I ll try to rephrase it better:
I simply want the print statement to appear in both the log file and the
console.
print("goes in both") -> the log also gets this and the console also.
Thanks
On Thu, Nov 5, 2009 at 1:29 PM, <exarkun at twistedmatrix.com> wrote:
> On 08:59 am, namanvit at gmail.com wrote:
> >People,
> >
> >Can anyone help me with this issue?
> >
> >log.startLogging(open(logname,'w')
> >or
> >log.startLogging(open(logname,'w'), setStdout=True)
> >
> >Both print the console output in the log. But nothing is displayed on
> >console! So I get a empty console
> >I would like to keep the console going also:
> >
> >Precisely:
> >Console -> gets the print calls Not
> >Happening
> >Log -> gets the print calls + log.msg calls Happening
> >
> >I understand that this might be a trivial issue, but I am not able to
> >figure
> >it out in the documentation available :(
>
> Asking the same thing over and over again isn't going to get you an
> answer. Try making your question more clear. I haven't answered
> because I don't understand what you're trying to achieve.
>
> Jean-Paul
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20091105/4001a719/attachment.html>
More information about the Twisted-Python
mailing list