commit f9dd116f3f1c3c68007ae54c5734c2eff457b0bb
Author: A-Konig <alex-nebulae@seznam.cz>
Date:   Fri Jun 11 16:10:52 2021 +0200

    re #9036 Editing logging

diff --git a/Server/ServerApp/Parser/Parsers/DataParser.cs b/Server/ServerApp/Parser/Parsers/DataParser.cs
index 1d8bf52..f4cd671 100644
--- a/Server/ServerApp/Parser/Parsers/DataParser.cs
+++ b/Server/ServerApp/Parser/Parsers/DataParser.cs
@@ -220,7 +220,6 @@ namespace ServerApp.Parser.Parsers
         /// </summary>
         private void WriteToConsole(List<ActivityInfo> list)
         {
-            // TODO useless in finished app
             if (list == null)
             {
                 Console.WriteLine("Unsuccessful parsing");
@@ -240,7 +239,6 @@ namespace ServerApp.Parser.Parsers
         /// </summary>
         private void WriteToConsole(List<WeatherInfo> list)
         {
-            // TODO useless in finished app
             if (list == null)
             {
                 Console.WriteLine("Unsuccessful parsing");
diff --git a/Server/ServerApp/Parser/Parsers/JisParser.cs b/Server/ServerApp/Parser/Parsers/JisParser.cs
index a67e121..8f3b4ed 100644
--- a/Server/ServerApp/Parser/Parsers/JisParser.cs
+++ b/Server/ServerApp/Parser/Parsers/JisParser.cs
@@ -5,6 +5,7 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using log4net;
 using ServerApp.Parser.InputData;
 using ServerApp.Parser.OutputInfo;
 
@@ -17,6 +18,8 @@ namespace ServerApp.Parser.Parsers
     /// <author>A. Konig</author>
     public class JisParser
     {
+        /// <summary> Logger </summary>
+        private static readonly ILog _log = LogManager.GetLogger(typeof(JisParser));
 
         /// <summary> Datafile loader  </summary>
         IDataLoader loader;
@@ -71,7 +74,7 @@ namespace ServerApp.Parser.Parsers
             }
             catch
             {
-                Console.WriteLine("Incorrect jis input file " + current);
+                _log.Error("Incorrect jis input file " + current);
             }
 
             return list;
@@ -141,8 +144,7 @@ namespace ServerApp.Parser.Parsers
                 }
                 else
                 {
-                    // TODO uknown code handling -> to file?
-                    // Console.WriteLine("Unknown code " + list[i].placeTag);
+                    _log.Warn("Unknown code " + list[i].placeTag);
                 }
 
             }
@@ -217,8 +219,6 @@ namespace ServerApp.Parser.Parsers
                     // start time of last interval
                     DateTime stTime = new DateTime(lastStartTime.Year, lastStartTime.Month, lastStartTime.Day, startingTime, 0, 0);
 
-                    // TODO zjistit kolik se vynechalo a přidat tolik nul?
-
                     // find end and start time
                     if (!trigger)
                         index++;
@@ -260,8 +260,7 @@ namespace ServerApp.Parser.Parsers
                 }
                 else
                 {
-                    // TODO uknown code handling -> to file?
-                    // Console.WriteLine("Unknown code " + list[i].placeTag);
+                    _log.Warn("Unknown code " + list[i].placeTag);
                 }
 
             }
diff --git a/Server/ServerApp/Parser/Parsers/LogInParser.cs b/Server/ServerApp/Parser/Parsers/LogInParser.cs
index ffa6a88..1c8aee2 100644
--- a/Server/ServerApp/Parser/Parsers/LogInParser.cs
+++ b/Server/ServerApp/Parser/Parsers/LogInParser.cs
@@ -2,6 +2,7 @@
 // Author: A. Konig
 //
 
+using log4net;
 using ServerApp.Parser.InputData;
 using ServerApp.Parser.OutputInfo;
 using System;
@@ -17,6 +18,9 @@ namespace ServerApp.Parser.Parsers
     /// <author>A. Konig</author>
     public class LogInParser
     {
+        /// <summary> Logger </summary>
+        private static readonly ILog _log = LogManager.GetLogger(typeof(LogInParser));
+
         /// <summary> Datafile loader  </summary>
         IDataLoader loader;
 
@@ -69,7 +73,7 @@ namespace ServerApp.Parser.Parsers
                 }
             } catch
             {
-                Console.WriteLine("Incorrect Login input file " + current);
+                _log.Error("Incorrect Login input file " + current);
             }
 
             return list;
@@ -131,7 +135,6 @@ namespace ServerApp.Parser.Parsers
                 if (TagInfo.buildingTags.ContainsKey(place))
                 {
                     int index = TagInfo.buildingTags[place];
-                    //Console.WriteLine(place + " " + index);
 
                     // to all
                     if (index == -1)
@@ -143,8 +146,7 @@ namespace ServerApp.Parser.Parsers
                 }
                 else
                 {
-                    // TODO uknown code handling -> to file?
-                    // Console.WriteLine("Unknown code " + list[i].building);
+                    _log.Warn("Unknown code " + list[i].building);
                 }
 
             }
@@ -262,8 +264,7 @@ namespace ServerApp.Parser.Parsers
                 }
                 else
                 {
-                    // TODO uknown code handling -> write to file?
-                    // Console.WriteLine("Unknown code " + list[i].building);
+                    _log.Warn("Unknown code " + list[i].building);
                 }
 
             }
diff --git a/Server/ServerApp/Parser/Parsers/TagInfo.cs b/Server/ServerApp/Parser/Parsers/TagInfo.cs
index 3a74b49..6c1a0eb 100644
--- a/Server/ServerApp/Parser/Parsers/TagInfo.cs
+++ b/Server/ServerApp/Parser/Parsers/TagInfo.cs
@@ -12,14 +12,26 @@ namespace ServerApp.Parser.Parsers
     /// <author>Alex Konig</author>
     public class TagInfo
     {
+        /// <summary> Array with names of buildings </summary>
         public static string[] buildings;
 
-        // -1 all
+        /// <summary> 
+        /// Dictionary of places from jis files, and the index of building to which they belong
+        /// -1 means all indices
+        /// </summary>
         public static Dictionary<string, int> jisPlaces;
         
-        // -1 all -2 FST, FEK
+        /// <summary>
+        /// Dictionary of room prefixes and the index of building to which they belong
+        /// -1 means all indices
+        /// </summary>
         public static Dictionary<string, int> buildingTags;
 
+        /// <summary>
+        /// Get the index of a specific building in array buildings
+        /// </summary>
+        /// <param name="tag">Building abbrevation</param>
+        /// <returns>Index in array buildings, -1 if not found</returns>
         public static int IndexOfBuilding(string tag)
         {
             for (int i = 0; i < buildings.Length; i++)
@@ -31,6 +43,9 @@ namespace ServerApp.Parser.Parsers
             return -1;
         }
 
+        /// <summary>
+        /// Create dictionaries with jis places and room prefixes
+        /// </summary>
         public static void CreateDictionaries()
         {
             jisPlaces = new Dictionary<string, int>();
diff --git a/Server/ServerApp/Parser/Parsers/WeatherParser.cs b/Server/ServerApp/Parser/Parsers/WeatherParser.cs
index 07d667a..d9394d8 100644
--- a/Server/ServerApp/Parser/Parsers/WeatherParser.cs
+++ b/Server/ServerApp/Parser/Parsers/WeatherParser.cs
@@ -2,6 +2,7 @@
 // Author: A. Konig
 //
 
+using log4net;
 using ServerApp.Parser.InputData;
 using ServerApp.Parser.OutputInfo;
 using System;
@@ -17,6 +18,8 @@ namespace ServerApp.Parser.Parsers
     /// <author>A. Konig</author>
     public class WeatherParser
     {
+        /// <summary> Logger </summary>
+        private static readonly ILog _log = LogManager.GetLogger(typeof(WeatherParser));
 
         /// <summary> Datafile loader  </summary>
         IDataLoader loader;
@@ -72,7 +75,7 @@ namespace ServerApp.Parser.Parsers
                 }
             } catch
             {
-                Console.WriteLine("Incorrect Weather input file " + current);
+                _log.Error("Incorrect Weather input file " + current);
             }
 
             return list;
diff --git a/Server/ServerApp/WeatherPredictionParser/JsonParser.cs b/Server/ServerApp/WeatherPredictionParser/JsonParser.cs
index 9228a4e..36b63eb 100644
--- a/Server/ServerApp/WeatherPredictionParser/JsonParser.cs
+++ b/Server/ServerApp/WeatherPredictionParser/JsonParser.cs
@@ -2,14 +2,13 @@
 // Author: A. Konig
 //
 
+using log4net;
 using ServerApp.DataDownload;
 using ServerApp.Parser.InputData;
 using ServerApp.Parser.OutputInfo;
 using System;
 using System.Collections.Generic;
 using System.Globalization;
-using System.IO;
-using System.Net;
 using System.Text.Json;
 using static System.Text.Json.JsonElement;
 
@@ -21,6 +20,9 @@ namespace ServerApp.WeatherPredictionParser
     /// <author>A. Konig</author>
     public class JsonParser : IJsonParser
     {
+        /// <summary> Logger </summary>
+        private static readonly ILog _log = LogManager.GetLogger(typeof(JsonParser));
+
         /// <summary> Data downloader </summary>
         IDataDownloader downloader;
         /// <summary> Data loader </summary>
@@ -135,7 +137,6 @@ namespace ServerApp.WeatherPredictionParser
                 while (weatherP.MoveNext())
                 {
                     string name = weatherP.Current.Name;
-                    Console.WriteLine(name);
 
                     switch (name)
                     {
@@ -162,7 +163,7 @@ namespace ServerApp.WeatherPredictionParser
                 EncompassSunRiseSetTimes();
             } catch
             {
-                Console.WriteLine("Weather prediction file in incorrect format");
+                _log.Error("Weather prediction file in incorrect format");
                 Current = new WeatherInfo();
                 Predictions = new List<WeatherInfo>();
             }
@@ -343,7 +344,6 @@ namespace ServerApp.WeatherPredictionParser
                                 DateTime newSunrise = new DateTime();
                                 DateTime.TryParseExact(astrInfo.Current.Value.GetString(), "hh:mm tt", CultureInfo.InvariantCulture, DateTimeStyles.None, out newSunrise);
                                 sunriseTime.Add(newSunrise);
-                                //Console.WriteLine("\t sunrise time : " + sunriseTime + " " + astrInfo.Current.Value.GetString());
                                 break;
                             }
                         case "sunset":
@@ -351,7 +351,6 @@ namespace ServerApp.WeatherPredictionParser
                                 DateTime newSunset = new DateTime();
                                 DateTime.TryParseExact(astrInfo.Current.Value.GetString(), "hh:mm tt", CultureInfo.InvariantCulture, DateTimeStyles.None, out newSunset);
                                 sunsetTime.Add(newSunset);
-                                //Console.WriteLine("\t sunset time : " + sunsetTime + " " + astrInfo.Current.Value.GetString());
                                 break;
                             }
                     }
@@ -423,7 +422,6 @@ namespace ServerApp.WeatherPredictionParser
                     }
                 }
 
-                // Console.WriteLine(weather.ToString());
                 Predictions.Add(weather);
             }
 
