/// <summary> /// Publish a <see cref="RxLogEntry"/> to the host. /// </summary> /// <param name="entry"></param> public void Publish(RxLogEntry entry) { Guard.NotNull(entry); if (Enabled) { LogHost.Publish(entry); } }
/// <summary> /// Publish a lost entry using the specified meta and instance data. /// </summary> /// <param name="meta"></param> /// <param name="instance"></param> /// <returns></returns> public static RxLogEntry Log(RxLogEntryMeta meta, object instance) { Guard.NotNull(instance); var entry = new RxLogEntry(meta, instance); Log(entry); return(entry); }
/// <summary> /// Create and publish a log entry with specified <see cref="RxLogEntryMeta"/> and instance data. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="meta"></param> /// <param name="instance"></param> /// <returns></returns> public static RxLogEntry <T> Log <T>(RxLogEntryMeta meta, T instance) { Guard.NotNull(instance); var entry = new RxLogEntry <T>(meta, instance); Log(entry); return(entry); }
public static RxLogEntry Log(this object publisher, object instance, [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int lineNo = 0) { Guard.NotNull(publisher); var meta = RxLog.CreateMeta(publisher.GetType(), callerMemberName, lineNo); var entry = new RxLogEntry(meta, instance); RxLog.Log(entry); return(entry); }
/// <summary> /// Internal method to enqueue a message /// </summary> /// <param name="entry"></param> internal void Enqueue(RxLogEntry entry) { _syncsubject.OnNext(entry); }
/// <summary> /// Public a <see cref="RxLog"/> to subscribers. /// </summary> /// <param name="entry"></param> public void Publish(RxLogEntry entry) { _pumpSubject.OnNext(entry); }
/// <summary> /// Log an entry to the default log writer. /// </summary> /// <param name="entry"></param> public static void Log(RxLogEntry entry) { Guard.NotNull(entry); Default?.Publish(entry); }