:: Re: [Libbitcoin] bitcoin_server > c…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Eric Voskuil
Date:  
À: William Swanson, libbitcoin@lists.dyne.org
Sujet: Re: [Libbitcoin] bitcoin_server > console.log
Hi William, great to see you taking a look.

The logging is originating from libbitcoin and I don't believe that area
has changed much, and it does terminate all writes with std::endl:

https://github.com/libbitcoin/libbitcoin/blob/master/src/utility/logger.cpp#L51

But I can see the behavior you are describing. I don't at the present
see the reason for the delayed log flush.

The server console interaction (startup/shutdown) is distinct from the
logging behavior, and has been updated to be more consistent with bx
(e.g. using boost::program_options). This section does not terminate any
lines with std::endl. The reason the line returns are in text is to
facilitate integration of multi-line output in the case of eventual
localization. But that's not a significant issue, it's all in one place,
and I'd be happy to change it.

e



On 02/16/2015 11:41 AM, William Swanson wrote:
> Hello,
> I am playing with the new bitcoin_server code. Our old obelisk scripts
> would run the server in the background like "obelisk > console.log".
> That way, the user doesn't need to be logged into the server at all
> times, but is still able to view the console output by doing "tail -f
> console.log".
>
> Unfortunately, the new bitcoin_server no longer handles this case
> correctly. The process no longer flushes the stream correctly, so
> there will be no output for a long time, followed by one complete
> buffer's worth of characters (like 1K of text or whatever the stdlib
> uses). The process really ought to be flushing the stream after each
> line of output, such as by "<< std::endl" or such. Does anybody know
> when this changed? I'd like to get it fixed.
>
> -William
> _______________________________________________
> Libbitcoin mailing list
> Libbitcoin@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/libbitcoin
>