Skip to content

Commit

Permalink
Fix of unusable version 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
moberacker committed Jul 27, 2017
1 parent afbc6c6 commit 835e6a5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Log4ALA/Log4ALA.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Log4Net appender for Azure Log Analytics (ALA)... sending data to Azure Log Analytics with the HTTP Data Collector API. The data will also be logged/sent asynchronously for high performance and to avoid blocking the caller thread.</description>
<copyright>Copyright © 2017 PTV Group</copyright>
<releaseNotes>Add configurable priority (threadPriority) of the background worker thread and fixed issue to avoid high CPU usage.</releaseNotes>
<releaseNotes>Fix of unusable version 2.0.2.</releaseNotes>
<dependencies>
<dependency id="log4net" version="2.0.5" />
<dependency id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" />
Expand Down
4 changes: 2 additions & 2 deletions Log4ALA/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.2")]
[assembly: AssemblyFileVersion("2.0.2")]
[assembly: AssemblyVersion("2.0.3")]
[assembly: AssemblyFileVersion("2.0.3")]
19 changes: 11 additions & 8 deletions Log4ALA/QueueLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,18 @@ protected virtual void Run()
{
try
{
line = Queue.Take();
if (!string.IsNullOrWhiteSpace(line))
if (Queue.Count > 0)
{
byteLength += System.Text.Encoding.Unicode.GetByteCount(line);

buffer.Append(line);
buffer.Append(",");
++numItems;
line = string.Empty;
line = Queue.Take();
if (!string.IsNullOrWhiteSpace(line))
{
byteLength += System.Text.Encoding.Unicode.GetByteCount(line);

buffer.Append(line);
buffer.Append(",");
++numItems;
line = string.Empty;
}
}
}
catch (Exception ee)
Expand Down

0 comments on commit 835e6a5

Please sign in to comment.