Skip to content

Commit

Permalink
Merge pull request #43 from lmanners/master
Browse files Browse the repository at this point in the history
Add AppendKeyValueAscii methods to ILogEvent interface
  • Loading branch information
ltrzesniewski authored Dec 23, 2020
2 parents 7841156 + 95fca80 commit 2f83b8f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ZeroLog/ForwardingLogEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public void AppendGeneric<T>(T arg)
public ILogEvent AppendAsciiString(ReadOnlySpan<byte> bytes) => this;
public ILogEvent AppendAsciiString(ReadOnlySpan<char> chars) => this;
public ILogEvent AppendKeyValue(string key, string? value) => this;
public ILogEvent AppendKeyValueAscii(string key, byte[]? bytes, int length) => this;
public unsafe ILogEvent AppendKeyValueAscii(string key, byte* bytes, int length) => this;
public ILogEvent AppendKeyValueAscii(string key, ReadOnlySpan<byte> bytes) => this;
public ILogEvent AppendKeyValueAscii(string key, ReadOnlySpan<char> chars) => this;

public ILogEvent AppendKeyValue<T>(string key, T value)
where T : struct, Enum
Expand Down
4 changes: 4 additions & 0 deletions src/ZeroLog/ILogEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public partial interface ILogEvent : ILogEventHeader
unsafe ILogEvent AppendAsciiString(byte* bytes, int length);
ILogEvent AppendAsciiString(ReadOnlySpan<byte> bytes);
ILogEvent AppendAsciiString(ReadOnlySpan<char> chars);
ILogEvent AppendKeyValueAscii(string key, byte[]? bytes, int length);
unsafe ILogEvent AppendKeyValueAscii(string key, byte* bytes, int length);
ILogEvent AppendKeyValueAscii(string key, ReadOnlySpan<byte> bytes);
ILogEvent AppendKeyValueAscii(string key, ReadOnlySpan<char> chars);

ILogEvent AppendEnum<T>(T value)
where T : struct, Enum;
Expand Down
4 changes: 4 additions & 0 deletions src/ZeroLog/NoopLogEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public void AppendGeneric<T>(T arg)
public ILogEvent AppendAsciiString(ReadOnlySpan<byte> bytes) => this;
public ILogEvent AppendAsciiString(ReadOnlySpan<char> chars) => this;
public ILogEvent AppendKeyValue(string key, string? value) => this;
public ILogEvent AppendKeyValueAscii(string key, byte[]? bytes, int length) => this;
public unsafe ILogEvent AppendKeyValueAscii(string key, byte* bytes, int length) => this;
public ILogEvent AppendKeyValueAscii(string key, ReadOnlySpan<byte> bytes) => this;
public ILogEvent AppendKeyValueAscii(string key, ReadOnlySpan<char> chars) => this;

public ILogEvent AppendKeyValue<T>(string key, T value)
where T : struct, Enum
Expand Down

0 comments on commit 2f83b8f

Please sign in to comment.