FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

mango.log help
Goto page Previous  1, 2
 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Wed Jan 25, 2006 12:24 pm    Post subject: Reply with quote

larsivi wrote:
Well, the last one matches Stdout.println in functionality and might be better if you're sure it will always work.

It only worked with Stdout.println when asserts were compiled out ~ t'was a bug waiting to happen (using radix 's' ~ all conversions go through Integer.convert) Smile

What does writef() do?
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Wed Jan 25, 2006 12:27 pm    Post subject: Reply with quote

kris wrote:
larsivi wrote:
Well, the last one matches Stdout.println in functionality and might be better if you're sure it will always work.

It only worked with Stdout.println when asserts were compiled out ~ t'was a bug waiting to happen (using radix 's' ~ all conversions go through Integer.convert) Smile

What does writef() do?


In general, it just works with writef. Whether it is supposed to or not, I don't know Smile
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Wed Jan 25, 2006 6:49 pm    Post subject: Reply with quote

OK ~ I'll map ?s onto ?d
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu Feb 09, 2006 2:26 pm    Post subject: Pipes Reply with quote

Is it possible to pipe mango.log output? I get some largish output and want to grep it directly, eg "foo | grep 'bar'" where foo is the program and bar what I search for. But it seems to just print everything in any case.

I'm using a latish mango svn and Kubuntu Breezy.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Thu Feb 09, 2006 3:19 pm    Post subject: Re: Pipes Reply with quote

larsivi wrote:
Is it possible to pipe mango.log output? I get some largish output and want to grep it directly, eg "foo | grep 'bar'" where foo is the program and bar what I search for. But it seems to just print everything in any case.

I'm using a latish mango svn and Kubuntu Breezy.

Console logging is sent to stderr ~ can you hook a pipe to that?
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Thu Feb 09, 2006 3:46 pm    Post subject: Reply with quote

Alternatively, you might attach a FileLogger to the appropriate part of the log-tree?
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu Feb 09, 2006 3:49 pm    Post subject: Reply with quote

kris wrote:
Alternatively, you might attach a FileLogger to the appropriate part of the log-tree?


Nah, it's only about convenience.

I can use named pipes (thanks h3r3tic) like this:

Code:

mkfifo myFifo
foo 2> myFifo &
cat myFifo | grep 'bar'
rm myFifo


And it is as easy/not easy as using files.
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Mon Feb 13, 2006 11:31 am    Post subject: Reply with quote

Hmm, just wondering, wouldn't it be possible to have a Stdout appender and a Stderr appender, so I could choose? I don't consider all the output as stderr stuff.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue Feb 14, 2006 1:30 pm    Post subject: Reply with quote

larsivi wrote:
Hmm, just wondering, wouldn't it be possible to have a Stdout appender and a Stderr appender, so I could choose?

Don't see why not Smile

Alternatively, I suppose one might change ConsoleAppender to handle both (since there's no additional imports needed). Perhaps a boolean ctor argument that defaults to Stderr, and then an indirection on Cerr/stderr & Cout/stdout instead of the direct call? Kind of a toss-up as to which way to go, since making the ConsoleAppender be an abstract-baseclass instead would certainly make sense also. I'd perhaps choose the latter if we could skirt around backward compatability concerns.

What do you think?
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Tue Feb 14, 2006 2:06 pm    Post subject: Reply with quote

kris wrote:
larsivi wrote:
Hmm, just wondering, wouldn't it be possible to have a Stdout appender and a Stderr appender, so I could choose?

Don't see why not Smile

Alternatively, I suppose one might change ConsoleAppender to handle both (since there's no additional imports needed). Perhaps a boolean ctor argument that defaults to Stderr, and then an indirection on Cerr/stderr & Cout/stdout instead of the direct call? Kind of a toss-up as to which way to go, since making the ConsoleAppender be an abstract-baseclass instead would certainly make sense also. I'd perhaps choose the latter if we could skirt around backward compatability concerns.

What do you think?


Whatever you think is best Smile I'm not deep into the usage anyhow.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue Feb 14, 2006 5:01 pm    Post subject: Reply with quote

larsivi wrote:
Whatever you think is best Smile I'm not deep into the usage anyhow.

OK. I'll probably subclass since that will allow one to emit to both stdout & stderr, if one so desired.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group