private void WriteTestLogs(Castle.Core.Logging.ILogger logger) { logger.Debug("Testing debug"); logger.Warn("Testing warning"); logger.Info("Testing info"); }
public void Execute(IJobExecutionContext context) { logger.Debug($"I'am in the {context.JobDetail.Description} now :)"); Console.WriteLine($"Hello i am a job running under {Thread.CurrentThread.Name}, and my name is: {context.JobDetail.Description}!.."); logger.Debug($"Now i'm leaving {context.JobDetail.Description} now :)"); }
/// <summary> /// Same as ILogger.Debug, except this automatically prepends calling method's name /// </summary> /// <param name="logger"></param> /// <param name="message"></param> public static void D(this Castle.Core.Logging.ILogger logger, string message) { var method = LogManager.GetMethod(); logger.Debug(method.Name + ": " + message); }