aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Logging.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs
index 8c7292b69..2642d72ac 100644
--- a/src/Text/Pandoc/Logging.hs
+++ b/src/Text/Pandoc/Logging.hs
@@ -85,6 +85,7 @@ data LogMessage =
| CouldNotParseCSS Text
| Fetching Text
| Extracting Text
+ | LoadedResource FilePath FilePath
| NoTitleElement Text
| NoLangSpecified
| InvalidLang Text
@@ -195,6 +196,9 @@ instance ToJSON LogMessage where
["path" .= fp]
Extracting fp ->
["path" .= fp]
+ LoadedResource orig found ->
+ ["for" .= orig
+ ,"from" .= found]
NoTitleElement fallback ->
["fallback" .= fallback]
NoLangSpecified -> []
@@ -309,6 +313,8 @@ showLogMessage msg =
"Fetching " <> fp <> "..."
Extracting fp ->
"Extracting " <> fp <> "..."
+ LoadedResource orig found ->
+ "Loaded " <> Text.pack orig <> " from " <> Text.pack found
NoTitleElement fallback ->
"This document format requires a nonempty <title> element.\n" <>
"Defaulting to '" <> fallback <> "' as the title.\n" <>
@@ -389,6 +395,7 @@ messageVerbosity msg =
CouldNotParseCSS{} -> WARNING
Fetching{} -> INFO
Extracting{} -> INFO
+ LoadedResource{} -> INFO
NoTitleElement{} -> WARNING
NoLangSpecified -> INFO
InvalidLang{} -> WARNING