|
@@ -23,7 +23,7 @@ namespace InABox.Mobile
|
|
|
|
|
|
private static string _logfilenameincludingpath;
|
|
|
|
|
|
- private static void CheckLogger()
|
|
|
+ private static Logger CheckLogger()
|
|
|
{
|
|
|
if (_logger == null)
|
|
|
{
|
|
@@ -46,22 +46,19 @@ namespace InABox.Mobile
|
|
|
.WriteTo.File(_logfilenameincludingpath)
|
|
|
.CreateLogger();
|
|
|
}
|
|
|
+ return _logger;
|
|
|
}
|
|
|
|
|
|
public static void Log(LogType type, string entitytype, string message, string page)
|
|
|
{
|
|
|
- CheckLogger();
|
|
|
- System.Diagnostics.Debug.WriteLine($"[Log] {message}");
|
|
|
- Console.WriteLine($"[Log] {message}");
|
|
|
- _logger.Information("{Type} {Entity} {Message} {Page}", type, entitytype, message, page);
|
|
|
+ CheckLogger()
|
|
|
+ .Information("{Type} {Entity} {Message} {Page}", type, entitytype, message, page);
|
|
|
}
|
|
|
|
|
|
public static void Log(string message)
|
|
|
{
|
|
|
- CheckLogger();
|
|
|
- System.Diagnostics.Debug.WriteLine($"[Log] {message}");
|
|
|
- Console.WriteLine($"[Log] {message}");
|
|
|
- _logger.Information("{Log}", message);
|
|
|
+ CheckLogger()
|
|
|
+ .Information("{Log}", message);
|
|
|
}
|
|
|
|
|
|
public static void Log(Exception exception, String tag = "")
|