

Public Member Functions | |
| CollectingLogger (String name, String resourceBundleName) | |
| void | produceLogs1 (int number) |
Private Member Functions | |
| void | sleep (long millis) |
Creates a Logger that collects all LogRecords produced by calls to the various log methods. This can be used to generate valid LogRecords for unit tests.
| alma::acs::logging::CollectingLogger::CollectingLogger | ( | String | name, | |
| String | resourceBundleName | |||
| ) | [inline] |
Don't use this ctor directly! Instead, use LogRecordCollectingLogger#getCollectingLogger(java.lang.String, java.lang.Class), passing CollectingLogger.class as the second argument. (This is some experiment, so don't ask why...)
| name | ||
| resourceBundleName |
| void alma::acs::logging::CollectingLogger::produceLogs1 | ( | int | number | ) | [inline] |
Produces a sequence of LogRecords which can be obtained in getCollectedLogRecords(). Output is limited by the number parameter. The algorithm is:
| number |
References alma::acs::testsupport::LogRecordCollectingLogger::log(), and sleep().
Referenced by alma::acs::logging::RemoteLogDispatcherTest::testFailingRecords(), alma::acs::logging::RemoteLogDispatcherTest::testFlushByRecordNumber(), alma::acs::logging::RemoteLogDispatcherTest::testPeriodicFlush(), alma::acs::logging::RemoteLogDispatcherTest::testQueueOverflow(), alma::acs::logging::RemoteLogDispatcherTest::testSendLogRecords(), and alma::acs::logging::RemoteLogDispatcherTest::testUnavailableRemoteLogService().
| void alma::acs::logging::CollectingLogger::sleep | ( | long | millis | ) | [inline, private] |
Referenced by produceLogs1().
1.6.2