Class MemoryBufferSink
Implements a destination that caches up to specified number of latest log messages in memory
Inheritance
System.Object
MemoryBufferSink
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Azos.Log.Sinks
Assembly: Azos.dll
Syntax
public sealed class MemoryBufferSink : Sink, IDisposable, IDaemon, IDaemonView, IApplicationComponent, ILocalizedTimeProvider, IInstrumentable, IExternallyParameterized, IConfigurable, INamed, IOrdered
Constructors
MemoryBufferSink(ISinkOwner)
Declaration
public MemoryBufferSink(ISinkOwner owner)
Parameters
Type | Name | Description |
---|---|---|
ISinkOwner | owner |
MemoryBufferSink(ISinkOwner, String, Int32)
Declaration
public MemoryBufferSink(ISinkOwner owner, string name, int order)
Parameters
Type | Name | Description |
---|---|---|
ISinkOwner | owner | |
System.String | name | |
System.Int32 | order |
Fields
BUFFER_SIZE_DEFAULT
Declaration
public const int BUFFER_SIZE_DEFAULT = 1024
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
Buffered
Returns all buffered log messages, where X = BufferSize property
Declaration
public IEnumerable<Message> Buffered { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Message> |
BufferedTimeAscending
Returns all buffered log messages ordered by timestamp ascending
Declaration
public IEnumerable<Message> BufferedTimeAscending { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Message> |
BufferedTimeDescending
Returns all buffered log messages ordered by timestamp descending
Declaration
public IEnumerable<Message> BufferedTimeDescending { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Message> |
BufferSize
Declaration
[Config]
[ExternalParameter(new string[]{"log", "instrumentation"})]
public int BufferSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
ClearBuffer()
Deletes all buffered messages
Declaration
public void ClearBuffer()
DoSend(Message)
Declaration
protected override void DoSend(Message entry)
Parameters
Type | Name | Description |
---|---|---|
Message | entry |
Overrides
Implements
System.IDisposable