Add swapLogSink and withLogSink