using System; using System.IO; using Composite.Core; namespace Demo { public class Class5 { public static void TestLog() { try { using (StreamReader sr = new StreamReader("NonExistingFile.txt")) { String line; while ((line = sr.ReadLine()) != null) { Log.LogInformation("Demo", line); } } } catch (Exception e) { Log.LogError("Demo", "The file could not be read"); Log.LogError("Demo", e.Message); Log.LogError("Demo", e); } } } }