diff --git a/CloudWatchAppender/Parsers/EventMessageParserBase.cs b/CloudWatchAppender/Parsers/EventMessageParserBase.cs index 5db36a6..9a179c1 100644 --- a/CloudWatchAppender/Parsers/EventMessageParserBase.cs +++ b/CloudWatchAppender/Parsers/EventMessageParserBase.cs @@ -106,7 +106,7 @@ protected void ParseTokens(ref List.Enumerator tokens, string renderedMes { v.Unit = unit; var t = StandardUnit.FindValue(unit.ToLowerInvariant()); - if (t.ToString() != unit) //If conversion capitalizes unit then it is valid and should not be included in rest. + if (t.ToString() != unit.ToLowerInvariant()) //If conversion capitalizes unit then it is valid and should not be included in rest. tokens.MoveNext(); } diff --git a/CloudWatchAppender/Parsers/LogsEventMessageParser.cs b/CloudWatchAppender/Parsers/LogsEventMessageParser.cs index 6873fc2..a9fb7e1 100644 --- a/CloudWatchAppender/Parsers/LogsEventMessageParser.cs +++ b/CloudWatchAppender/Parsers/LogsEventMessageParser.cs @@ -56,7 +56,7 @@ protected override bool FillName(AppenderValue value) { switch (value.Name.ToLowerInvariant()) { - case "rest": + case "__cav_rest": if (!string.IsNullOrEmpty(_currentDatum.Message)) return false; diff --git a/Examples/ContinuousTicks/Program.cs b/Examples/ContinuousTicks/Program.cs index d91fe54..ab96414 100644 --- a/Examples/ContinuousTicks/Program.cs +++ b/Examples/ContinuousTicks/Program.cs @@ -4,7 +4,7 @@ using log4net; using log4net.Config; -namespace Logs +namespace ContinuousTicks { internal class ContinuousTicks { @@ -21,8 +21,8 @@ private static void Main(string[] args) for (int i = 0; i < nTicks; i++) { //log.Info("A tick! Value: 2, Unit: Bytes, Unit: Kilobytes"); - //log.Info("A tick! Value: 29.4 Kilobytes"); - log.Info("A tick! Value: 0 Kilobytes"); + log.Info("A tick! Value: 29.4 Kilobytes"); + //log.Info("A tick! Value: 0 Kilobytes"); //log.Info(String.Format("A tick! Timestamp: {0}", DateTimeOffset.Now.AddMinutes(-10).ToString())); //log.Info(null); //log.Info("A tick! %logger %metadata{instanceid}");