Re: [Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Orin Eman
On Fri, May 25, 2012 at 5:22 AM, Ludovic Rousseau < ludovic.rouss...@gmail.com> wrote: > Hello, > > I have program that send its debug log to stdout. > libusbx used stderr or stdout depending of the log level. That is > weird but not really the problem. > > If a program uses both stdout and stderr

Re: [Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Ludovic Rousseau
2012/5/25 Pete Batard : > On 2012.05.25 15:28, Yves Arrouye wrote: >>  wrote: >>> I need a way to tell libusbx to use stdout (for every logs). >> >> If all logs go to stderr, can't you just redirect stderr to stout >> (e.g. 2>1 in a shell command)? > > Before looking at introducing a way to use ei

Re: [Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Pete Batard
On 2012.05.25 15:28, Yves Arrouye wrote: > wrote: >> I need a way to tell libusbx to use stdout (for every logs). > > If all logs go to stderr, can't you just redirect stderr to stout > (e.g. 2>1 in a shell command)? Before looking at introducing a way to use either of stderr or stdout, that's

Re: [Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Yves Arrouye
On Fri, May 25, 2012 at 6:00 AM, Ludovic Rousseau wrote: > 2012/5/25 Pete Batard : >> On 2012.05.25 13:22, Ludovic Rousseau wrote: > I am fine with that. > But that will not solve my problem. > > I need a way to tell libusbx to use stdout (for every logs). > > Bye If all logs go to stderr, can't

Re: [Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Yves Arrouye
I vote for stderr always too. On Fri, May 25, 2012 at 5:39 AM, Pete Batard wrote: > On 2012.05.25 13:22, Ludovic Rousseau wrote: >> The problem is when the flows are redirected to a file. The outputs >> are buffered and no more ordered correctly between stdout and stderr. > > Aha. I think I saw h

Re: [Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Ludovic Rousseau
2012/5/25 Pete Batard : > On 2012.05.25 13:22, Ludovic Rousseau wrote: >> The problem is when the flows are redirected to a file. The outputs >> are buffered and no more ordered correctly between stdout and stderr. > > Aha. I think I saw happen in the past and didn't realize this was the > actual c

Re: [Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Kustaa Nyholm
On 5/25/12 15:39, "Pete Batard" wrote: > >Personally I'd vote for using stderr always, on the grounds that: +1 for that. br Kusti -- Live Security Virtual Conference Exclusive live event will cover all the ways today's

Re: [Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Pete Batard
On 2012.05.25 13:22, Ludovic Rousseau wrote: > The problem is when the flows are redirected to a file. The outputs > are buffered and no more ordered correctly between stdout and stderr. Aha. I think I saw happen in the past and didn't realize this was the actual cause. > A solution is to be abl

[Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Ludovic Rousseau
Hello, I have program that send its debug log to stdout. libusbx used stderr or stdout depending of the log level. That is weird but not really the problem. If a program uses both stdout and stderr every thing is fine when stdout and stderr are sent to the console. The lines are ordered correctly