public static IDisposable AttachLogging <TIn, TOut>(this ReactiveCommand <TIn, TOut> command, string title, ILogger logger) { var cleanTitle = title.Replace("Command", string.Empty); CompositeDisposable cd = new CompositeDisposable { command.ThrownExceptions .LogException(logger) .Subscribe(), command .LogToAnalytics("Actions", cleanTitle) .Do(l => logger.Information("Action: " + cleanTitle)) .Subscribe() }; return(cd); }