Esempio n. 1
0
        public void Render(List <string> status, Track track, bool verbose)
        {
            if (verbose)
            {
                Log.Write(LogLevel.CRITICAL,
                          $"WARNING: {track.Tag} is colliding with {string.Join(", ", status.ToArray())}, {track.TimeStamp}");
            }

            Log.Write(LogLevel.NORMAL,
                      $"Plane: {track.Tag} \tAltitude: {track.Altitude}\t Cords: {track.XPos},{track.YPos} \tTs: {track.TimeStamp} \t Velocity: {Math.Round(track.Velocity, 2)} m/s \t Degree: {track.Degrees} deg");
        }
Esempio n. 2
0
 public void TestLogConfig(LogLevel level, string message)
 {
     log.Write(level, message);
     // locate file and check for msg
     if (level == LogLevel.CRITICAL)
     {
         var path  = Path.Combine(cfg.FilePath, cfg.FileName);
         var lines = File.ReadAllLines(path);
         Assert.That(lines.Contains(message), Is.True);
         File.Delete(path);
     }
     Assert.That(true, Is.True);
 }