Class LoggingReplicationClient
Custom replication client that logs
public class LoggingReplicationClient : ReplicationClient, IDisposable
- Inheritance
-
ReplicationClientLoggingReplicationClient
- Implements
- Inherited Members
-
ReplicationClient.INFO_STREAM_COMPONENTReplicationClient.EnsureOpen()ReplicationClient.Dispose()ReplicationClient.StopUpdateThread()ReplicationClient.ToString()ReplicationClient.UpdateNow()ReplicationClient.IsUpdateThreadAliveReplicationClient.InfoStream
Constructors
LoggingReplicationClient(ILogger<LoggingReplicationClient>, IReplicator, IReplicationHandler, ISourceDirectoryFactory)
public LoggingReplicationClient(ILogger<LoggingReplicationClient> logger, IReplicator replicator, IReplicationHandler handler, ISourceDirectoryFactory factory)
Parameters
loggerILogger<LoggingReplicationClient>replicatorIReplicatorhandlerIReplicationHandlerfactoryISourceDirectoryFactory
Methods
HandleUpdateException(Exception)
Called when an exception is hit by the replication thread. The default implementation prints the full stacktrace to the Lucene.Net.Util.InfoStream set in Lucene.Net.Replicator.ReplicationClient.InfoStream, or the Lucene.Net.Util.InfoStream.Default one. You can override to log the exception elsewhere.
protected override void HandleUpdateException(Exception exception)
Parameters
exceptionException
Remarks
NOTE: If you override this method to throw the exception further, the replication thread will be terminated. The only way to restart it is to call Lucene.Net.Replicator.ReplicationClient.StopUpdateThread() followed by StartUpdateThread(long, string).