This commit is contained in:
2022-12-25 11:05:41 +01:00
parent 795f9807d5
commit a3facd8bc2
2 changed files with 11 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
net6.0; net6.0;
</TargetFrameworks> </TargetFrameworks>
<ApplicationIcon>icon.ico</ApplicationIcon> <ApplicationIcon>icon.ico</ApplicationIcon>
<Version>1.0.3</Version> <Version>1.0.4</Version>
<Authors>EonaCat (Jeroen Saey)</Authors> <Authors>EonaCat (Jeroen Saey)</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Company>EonaCat (Jeroen Saey)</Company> <Company>EonaCat (Jeroen Saey)</Company>

View File

@@ -59,10 +59,19 @@ namespace EonaCat.logger.Managers
header = header.Replace("{sev}", logType.ToString()); header = header.Replace("{sev}", logType.ToString());
} }
string fullMessage = "[EonaCatLogger]" + " " + header + " " + currentMessage; string fullMessage = AddHeaderIfNotExists(header, currentMessage);
return fullMessage; return fullMessage;
} }
private static string AddHeaderIfNotExists(string header, string currentMessage)
{
if (!currentMessage.Contains("[EonaCatLogger]"))
{
return "[EonaCatLogger]" + " " + header + " " + currentMessage;
}
return currentMessage;
}
/// <summary> /// <summary>
/// Formats a given exception as a string /// Formats a given exception as a string
/// </summary> /// </summary>