Skip to content

Commit 8e652e8

Browse files
committed
Print filenames when logging Markdown formatting.
Because a class can consist of several files, list all the files separated by spaces.
1 parent 414ae93 commit 8e652e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/jsduck/app.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,15 @@ def format_classes
165165
class_formatter.include_types = !@opts.export
166166
# Format all doc-objects in parallel
167167
formatted_classes = @parallel.map(@relations.classes) do |cls|
168-
Logger.instance.log("Markdown formatting #{cls[:name]}")
168+
files = cls[:files].map {|f| f[:filename] }.join(" ")
169+
Logger.instance.log("Markdown formatting #{cls[:name]}", files)
169170
begin
170171
{
171172
:doc => class_formatter.format(cls.internal_doc),
172173
:images => doc_formatter.images
173174
}
174175
rescue
175-
Logger.instance.fatal("Error while formatting #{cls[:name]}", $!)
176+
Logger.instance.fatal("Error while formatting #{cls[:name]} #{files}", $!)
176177
exit(1)
177178
end
178179
end

0 commit comments

Comments
 (0)