librelist archives

« back to archive

How would I actively display a log file with flask?

How would I actively display a log file with flask?

From:
Eric Sales
Date:
2012-07-24 @ 21:32
Hi, I'm new to flask and wondering what is an efficient way to display an
active log file in a window (like tail -f).

thanks in advance,
~eric

Re: [flask] How would I actively display a log file with flask?

From:
Todd Kennedy
Date:
2012-07-24 @ 21:46
If you're logging to a file, then just use tail -f.

Or are you talking about the console output provided by the app.run() method?

On Jul 24, 2012, at 2:32 PM, Eric Sales wrote:

> Hi, I'm new to flask and wondering what is an efficient way to display 
an active log file in a window (like tail -f).
> 
> thanks in advance,
> ~eric

Re: [flask] How would I actively display a log file with flask?

From:
James Willson
Date:
2012-07-25 @ 08:18


Date: Tue, 24 Jul 2012 15:12:40 -0700
From: esoupy@gmail.com
Subject: Re: [flask] How would I actively display a log file with flask?
To: flask@librelist.com

I'm thinking to actively stream logfile output using a readline loop until
exit.Werkzeug has a readline and make_line_iter method that might be what 
i'm looking for.



On Tue, Jul 24, 2012 at 2:46 PM, Todd Kennedy <todd.kennedy@gmail.com> wrote:

If you're logging to a file, then just use tail -f.



Or are you talking about the console output provided by the app.run() method?



On Jul 24, 2012, at 2:32 PM, Eric Sales wrote:



> Hi, I'm new to flask and wondering what is an efficient way to display 
an active log file in a window (like tail -f).

>

> thanks in advance,

> ~eric




 		 	   		  

Re: [flask] How would I actively display a log file with flask?

From:
Devon Stewart
Date:
2012-07-24 @ 21:56
Might be off in the weeds here, but this seems like a "how would one get a
tail -f interface using a web browser" type of question. Perhaps for a 
web-based log viewer or something?

-Devon

On Jul 24, 2012, at 14:46, Todd Kennedy <todd.kennedy@gmail.com> wrote:

> If you're logging to a file, then just use tail -f.
> 
> Or are you talking about the console output provided by the app.run() method?
> 
> On Jul 24, 2012, at 2:32 PM, Eric Sales wrote:
> 
>> Hi, I'm new to flask and wondering what is an efficient way to display 
an active log file in a window (like tail -f).
>> 
>> thanks in advance,
>> ~eric
> 

Re: [flask] How would I actively display a log file with flask?

From:
Jurie Horneman
Date:
2012-07-26 @ 09:18
This is a simple solution that works for me:

https://gist.github.com/3181165

On Tue, Jul 24, 2012 at 11:56 PM, Devon Stewart <blast@hardchee.se> wrote:
> Might be off in the weeds here, but this seems like a "how would one get
a tail -f interface using a web browser" type of question. Perhaps for a 
web-based log viewer or something?
>
> -Devon
>
> On Jul 24, 2012, at 14:46, Todd Kennedy <todd.kennedy@gmail.com> wrote:
>
>> If you're logging to a file, then just use tail -f.
>>
>> Or are you talking about the console output provided by the app.run() method?
>>
>> On Jul 24, 2012, at 2:32 PM, Eric Sales wrote:
>>
>>> Hi, I'm new to flask and wondering what is an efficient way to display
an active log file in a window (like tail -f).
>>>
>>> thanks in advance,
>>> ~eric
>>

Re: [flask] How would I actively display a log file with flask?

From:
Eric Sales
Date:
2012-07-24 @ 22:12
I'm thinking to actively stream logfile output using a readline loop until
exit.
Werkzeug has a readline and make_line_iter method that might be what i'm
looking for.



On Tue, Jul 24, 2012 at 2:46 PM, Todd Kennedy <todd.kennedy@gmail.com>wrote:

> If you're logging to a file, then just use tail -f.
>
> Or are you talking about the console output provided by the app.run()
> method?
>
> On Jul 24, 2012, at 2:32 PM, Eric Sales wrote:
>
> > Hi, I'm new to flask and wondering what is an efficient way to display
> an active log file in a window (like tail -f).
> >
> > thanks in advance,
> > ~eric
>
>