-
Notifications
You must be signed in to change notification settings - Fork 4
Logging
Keel provides a logging implementation, focusing on Event.
Interface KeelEventLog is designed to record an event in logging,
it is marked with a level (check KeelLogLevel for detail), a timestamp and a topic,
as well holds an attributes map to bear information.
Interface KeelEventLogger is designed to produce logs for events.
Interface KeelEventLogCenter is designed to maintain loggers, where the loggers are created, cached, and be disposed of along with center itself.
There are three types of Log Center implementaions: sync, async, silent.
There are two way to obtain a logger instance but not actually log anything.
KeelSilentEventLogger silentEventLogger = KeelSilentEventLogger.getInstance();
silentEventLogger.notice("blind");
KeelEventLogger silentLoggerByCenter = KeelSilentEventLogCenter.getInstance().createLogger("silent");
silentLoggerByCenter.notice("blind");Class KeelSyncEventLogCenter provides a log center with an adapter (would be introduced later) to handle each log a time, i.e. synchronously.
Class KeelAsyncEventLogCenter provides a log center with an adapter to handle logs in batch, i.e. asynchronously.
Interface KeelEventLoggerAdapter is the base of any log handlers.
Check package io.github.sinri.keel.logger.event.adapter to see the original implementations.