I\'m testing out Azure Webjobs. I wrote a console application which polls a SQL database for new work and processes it. I\'m not using the WebJobs SDK because it only supp
I was able to get Console.WriteLine() to leave messages in my web job log. The following console runs and leaves log messages.
class Program
{
static void Main(string[] args)
{
while (true)
{
DoStuff();
Thread.Sleep(10000);
}
}
public static void DoStuff()
{
Console.WriteLine("do stuff");
}
}
This is what my log file shows:
[03/15/2014 04:05:28 > cf6d00: SYS INFO] Run script 'HelloWebJobConsoleApplication.exe' with script host - 'WindowsScriptHost'
[03/15/2014 04:05:28 > cf6d00: SYS INFO] Status changed to Running
[03/15/2014 04:05:28 > cf6d00: INFO] do stuff
[03/15/2014 04:05:38 > cf6d00: INFO] do stuff
[03/15/2014 04:05:48 > cf6d00: INFO] do stuff
[03/15/2014 04:05:58 > cf6d00: INFO] do stuff