Force output to be line-buffered, even when it's not connected to the terminal.
This is particuarly important for commands with --batch output, which was not always being flushed at an appropriate time.
This commit is contained in:
parent
8d90cd11b9
commit
249f7f4801
2 changed files with 8 additions and 0 deletions
|
@ -182,6 +182,11 @@ setupConsole = do
|
||||||
<*> pure preciseLogFormatter
|
<*> pure preciseLogFormatter
|
||||||
updateGlobalLogger rootLoggerName (setLevel NOTICE . setHandlers [s])
|
updateGlobalLogger rootLoggerName (setLevel NOTICE . setHandlers [s])
|
||||||
setConsoleEncoding
|
setConsoleEncoding
|
||||||
|
{- Force output to be line buffered. This is normally the case when
|
||||||
|
- it's connected to a terminal, but may not be when redirected to
|
||||||
|
- a file or a pipe. -}
|
||||||
|
hSetBuffering stdout LineBuffering
|
||||||
|
hSetBuffering stderr LineBuffering
|
||||||
|
|
||||||
{- Log formatter with precision into fractions of a second. -}
|
{- Log formatter with precision into fractions of a second. -}
|
||||||
preciseLogFormatter :: LogFormatter a
|
preciseLogFormatter :: LogFormatter a
|
||||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -3,6 +3,9 @@ git-annex (6.20160115) UNRELEASED; urgency=medium
|
||||||
* whereis --json: Urls are now listed inside the remote that claims them,
|
* whereis --json: Urls are now listed inside the remote that claims them,
|
||||||
rather than all together at the end.
|
rather than all together at the end.
|
||||||
* info: Support --batch mode.
|
* info: Support --batch mode.
|
||||||
|
* Force output to be line-buffered, even when it's not connected to the
|
||||||
|
terminal. This is particuarly important for commands with --batch
|
||||||
|
output, which was not always being flushed at an appropriate time.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Fri, 15 Jan 2016 14:05:01 -0400
|
-- Joey Hess <id@joeyh.name> Fri, 15 Jan 2016 14:05:01 -0400
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue