An implementation of
Handler that logs to the ticket system.
It queues log entries and logs them in the background. The log entries
are added in the order received, regardless of priority.
Will first look for any open/hold/bounced ticket that is for the same brand, account, language, type, level, prefix, classname, method, and category. If found, it will annotate that ticket. If not found, it will create a new ticket.
To minimize resource consumption, this shares one
ExecutorService for all handlers,
which means tickets are fed to the master(s) sequentially, even across many
- AO Industries, Inc.
Method SummaryModifier and TypeMethodDescription
close()Clean-up this handler and any that were garbage collected.
static TicketLoggingHandlerOnly one TicketLoggingHandler will be created per unique summaryPrefix, AoservConnector, and categoryDotPath.
Methods inherited from class com.aoapps.hodgepodge.logging.QueuedHandler
flush, newExecutor, publish, shutdownExecutor
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
TicketLoggingHandlerpublic TicketLoggingHandler() throws ConfigurationExceptionPublic constructor required so can be specified in
logging.properties. Supports the following optional settings in
(classname).summaryPrefix- the summary prefix for tickets.
(classname).username- the username to login as. When not set, the username from
(classname).password- the password to login with. When not set, the password from
(classname).categoryDotPath- the category dot path for tickets.
getHandlerpublic static TicketLoggingHandler getHandler
(String summaryPrefix, AoservConnector connector, String categoryDotPath)Only one TicketLoggingHandler will be created per unique summaryPrefix, AoservConnector, and categoryDotPath.
closepublic void close() throws SecurityExceptionClean-up this handler and any that were garbage collected.
backgroundPublishprotected void backgroundPublish
(Formatter formatter, LogRecord rec, String fullReport) throws IOException, SQLException