Files
Sourcetrail/ide_plugins/vs/vs2015/SourcetrailPlugin/SourcetrailPluginUtility/Logging/Logging.cs
T
malte_langkabel b659e81515 logic: fix more Visual Studio plugin issues
* using .Net framework version 4.6.1 in all projects
* implemented exception handling in VCFileWrapperFactory
* moved logging in separate assembly
* enabled logging in wrapper code
2017-06-06 15:46:14 +02:00

41 lines
1.1 KiB
C#

using System.Runtime.CompilerServices;
namespace CoatiSoftware.SourcetrailPlugin.Logging
{
public class Logging
{
public static void LogInfo(string message, [CallerFilePath] string file = "", [CallerMemberName] string member = "", [CallerLineNumber] int line = 0)
{
int idx = file.LastIndexOf('\\');
if(idx > -1)
{
file = file.Substring(idx + 1);
}
LogManager.GetInstance().LogInfo(message, file, member, line);
}
public static void LogWarning(string message, [CallerFilePath] string file = "", [CallerMemberName] string member = "", [CallerLineNumber] int line = 0)
{
int idx = file.LastIndexOf('\\');
if (idx > -1)
{
file = file.Substring(idx + 1);
}
LogManager.GetInstance().LogWarning(message, file, member, line);
}
public static void LogError(string message, [CallerFilePath] string file = "", [CallerMemberName] string member = "", [CallerLineNumber] int line = 0)
{
int idx = file.LastIndexOf('\\');
if (idx > -1)
{
file = file.Substring(idx + 1);
}
LogManager.GetInstance().LogError(message, file, member, line);
}
}
}