Пример #1
0
        public void Run([TimerTrigger("%timerSchedule%")] TimerInfo myTimer, ILogger log, ExecutionContext context)
        {
            log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");


            // Passing in the logger Initiated by the Function Scope
            WriteLogFunction("Test Log From Function!!!", log, context);

            // Passing in the logger Initiated by the Host Scope of the MyLoggerProvider
            _otherClass.WriteLogProvider("Test Log From Logger Provider!!!", context);

            _otherClass.TestMethod();
        }
Пример #2
0
        public void Run([TimerTrigger("*/5 * * * * *")] TimerInfo myTimer, ILogger log)
        {
            log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");

            _otherClass.TestMethod();
        }