Package uk.ac.starlink.ttools.votlint
Class PrintSaxMessager
java.lang.Object
uk.ac.starlink.ttools.votlint.PrintSaxMessager
- All Implemented Interfaces:
SaxMessager
SaxMessager implementation that writes messages to a given print stream.
An effort is made not to output the same message millions of times.
The maximum number of times the same message will be output is
controlled by the
maxRepeat
parameter.- Since:
- 29 Nov 2017
- Author:
- Mark Taylor
-
Nested Class Summary
Nested classes/interfaces inherited from interface uk.ac.starlink.ttools.votlint.SaxMessager
SaxMessager.Level
-
Constructor Summary
ConstructorsConstructorDescriptionPrintSaxMessager
(PrintStream out, boolean debug, int maxRepeat) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
reportMessage
(SaxMessager.Level level, VotLintCode code, String msg, Locator locator) Reports a message.
-
Constructor Details
-
PrintSaxMessager
Constructor.- Parameters:
out
- output stream to which messages will be writtendebug
- if true, a stack trace will be output with each log messagemaxRepeat
- maximum number of identical error messages which will be logged
-
-
Method Details
-
reportMessage
Description copied from interface:SaxMessager
Reports a message.- Specified by:
reportMessage
in interfaceSaxMessager
- Parameters:
level
- severity level of the message, not nullcode
- message identifiermsg
- message textlocator
- location in the XML document that provoked the message, or null if unknown/inapplicable
-