mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-07 12:28:39 +00:00
parent
a9380ac8e8
commit
a799505c78
1 changed files with 23 additions and 14 deletions
|
@ -25,6 +25,8 @@ public static class InfluxHelper
|
|||
};
|
||||
|
||||
public static async void Log()
|
||||
{
|
||||
try
|
||||
{
|
||||
using WriteApi writeApi = Client.GetWriteApi();
|
||||
PointData point = PointData.Measurement("lighthouse")
|
||||
|
@ -44,6 +46,13 @@ public static class InfluxHelper
|
|||
|
||||
writeApi.Flush();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Logger.Log("Exception while logging: ", LoggerLevelInflux.Instance);
|
||||
|
||||
foreach (string line in e.ToString().Split("\n")) Logger.Log(line, LoggerLevelInflux.Instance);
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task StartLogging()
|
||||
{
|
||||
|
@ -61,7 +70,7 @@ public static class InfluxHelper
|
|||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Logger.Log("Exception while logging: ", LoggerLevelInflux.Instance);
|
||||
Logger.Log("Exception while running log thread: ", LoggerLevelInflux.Instance);
|
||||
|
||||
foreach (string line in e.ToString().Split("\n")) Logger.Log(line, LoggerLevelInflux.Instance);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue