public static void BasicExample() { // Uusi information tyyppinen tietue JKLogger.Information("Terve 1!"); JKLogger.Dispose(); }
public static void OwnMapper() { // lisätään uusi mapperi MapperManager.DefaultMappers.Add(new OmaMapper()); JKLogger.Information("Terve 2!"); }
public static void UseTests() { // simple JKLogger.Error("This is Error"); JKLogger.Warning("This is Warning"); JKLogger.Information("This is Information"); JKLogger.SuccessAudit("This is SuccessAudit"); JKLogger.FailureAudit("This is FailureAudit"); JKLogger.Debug("This is Debug"); User testContext = new User("StaticTestName", 99); // more advanced JKLogger.Error("This is Error", testContext, "TestCategory"); JKLogger.Warning("This is Warning", testContext, "TestCategory"); JKLogger.Information("This is Information", testContext, "TestCategory"); JKLogger.SuccessAudit("This is SuccessAudit", testContext, "TestCategory"); JKLogger.FailureAudit("This is FailureAudit", testContext, "TestCategory"); JKLogger.Debug("This is Debug", testContext, "TestCategory"); }
public static void ReadFromDefault() { // Uusi information tyyppinen tietue JKLogger.Information("Terve 3!"); // haetaan default mapperin instanssi IReadable readable = MapperManager.GetDefaultMapper(typeof(Managed)) as IReadable; if (readable != null) { // annetaan instanssi readerille using (JKReader reader = new JKReader(readable)) { // loopataan lukijassa olevat tietueet foreach (IEntry entry in reader) { Console.WriteLine(entry.Message); } } } JKLogger.Dispose(); }