Exemple #1
0
 private static void PrintAllArgs(string[] args)
 {
     ILog logger = new ConsoleOutLogger("kernel.log", LogLevel.All, true, true, false, "yyyy/MM/dd HH:mm:ss:fff");
     logger.Debug("Hello2");
     foreach (string s in args)
     {
         logger.Debug(s);
     }
 }
Exemple #2
0
        private static ConnectionInformation GetConnectionInformation(string filename)
        {
            ILog logger = new ConsoleOutLogger("kernel.log", LogLevel.All, true, true, false, "yyyy/MM/dd HH:mm:ss:fff");

            logger.Info(string.Format("Opening file {0}", filename));
            string fileContent = File.ReadAllText(@filename);
            logger.Debug(fileContent);

            ConnectionInformation connectionInformation =
                JsonConvert.DeserializeObject<ConnectionInformation>(fileContent);

            return connectionInformation;
        }