use of core.framework.impl.log.LogManager in project core-ng-project by neowu.
the class ActionLogContext method track.
public static void track(String action, long elapsedTime, Integer readEntries, Integer writeEntries) {
LogManager logManager = logManager();
ActionLog actionLog = logManager.currentActionLog();
if (actionLog != null) {
actionLog.track(action, elapsedTime, readEntries, writeEntries);
}
}
use of core.framework.impl.log.LogManager in project core-ng-project by neowu.
the class ActionLogContext method put.
public static void put(String key, Object value) {
LogManager logManager = logManager();
ActionLog actionLog = logManager.currentActionLog();
if (actionLog != null) {
// here to check null is for unit testing the logManager.begin may not be called
actionLog.context(key, value);
}
}
use of core.framework.impl.log.LogManager in project core-ng-project by neowu.
the class ActionLogContext method id.
public static String id() {
LogManager logManager = logManager();
ActionLog actionLog = logManager.currentActionLog();
if (actionLog == null)
return null;
return actionLog.id;
}
use of core.framework.impl.log.LogManager in project core-ng-project by neowu.
the class KafkaMessagePublisherTest method createMessagePublisher.
@BeforeEach
void createMessagePublisher() {
producer = new MockProducer<>(true, new StringSerializer(), new ByteArraySerializer());
logManager = new LogManager();
messagePublisher = new KafkaMessagePublisher<>(producer, "topic", TestMessage.class, logManager);
}
use of core.framework.impl.log.LogManager in project core-ng-project by neowu.
the class ActionLogContext method get.
public static Optional<String> get(String key) {
LogManager logManager = logManager();
ActionLog actionLog = logManager.currentActionLog();
if (actionLog == null)
return Optional.empty();
return actionLog.context(key);
}
Aggregations