Commit ed9ab90b authored by Anthony Mochel's avatar Anthony Mochel
Browse files

feat(weather): use file logger manager

parent af09757e
using MySql.Data.Entity;

using MySql.Data.EntityFramework;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
......
......@@ -19,8 +19,9 @@ namespace BeeWeatherPollenTracker
#region Attributes
// Weather forecast data
private List<beehive_weather_forecast> _weather_forecast_list;
private static LoggerManager logs = null;
#endregion
/// <summary>
/// Create new instance of weatherforcase
/// </summary>
......@@ -31,6 +32,9 @@ namespace BeeWeatherPollenTracker
// Set up API KEY
ClientSettings.SetApiKey(OPEN_WEATHER_MAP_API_KEY);
// Set up the logger manager
logs = LoggerManager.GetInstance();
}
public void Process()
......@@ -93,7 +97,7 @@ namespace BeeWeatherPollenTracker
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
logs.WriteInFile(ex);
}
finally
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment