path: root/src/Text/Pandoc/App.hs
diff options
Diffstat (limited to 'src/Text/Pandoc/App.hs')
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index df1ed9fde..e4e47c1bf 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -71,12 +71,12 @@ import qualified Data.ByteString.Lazy as B
import qualified Data.ByteString as BS
import qualified Data.Map as M
import Data.Aeson (eitherDecode', encode)
-import Data.Aeson.Encode.Pretty (encodePretty)
import Data.Yaml (decode)
import qualified Data.Yaml as Yaml
import qualified Data.Text as T
import System.Console.GetOpt
import Text.Pandoc.Class (withMediaBag, PandocIO, getLog)
+import Text.Pandoc.Logging (logMessagesToJSON)
import Paths_pandoc (getDataDir)
#ifndef _WINDOWS
import System.Posix.Terminal (queryTerminal)
@@ -351,7 +351,7 @@ convertWithOpts opts = do
return (x, rs)
case optLogFile opts of
Nothing -> return ()
- Just logfile -> B.writeFile logfile (encodePretty reports)
+ Just logfile -> B.writeFile logfile (logMessagesToJSON reports)
let isWarning msg = messageVerbosity msg == WARNING
when (optFailIfWarnings opts && any isWarning reports) $
err 3 "Failing because there were warnings."