You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/webjobs-sdk-how-to.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: ggailey777
6
6
ms.devlang: csharp
7
7
ms.custom: devx-track-csharp
8
8
ms.topic: how-to
9
-
ms.date: 05/12/2025
9
+
ms.date: 05/09/2025
10
10
ms.author: glenga
11
11
#Customer intent: As an Azure App Service developer, I want use the WebJobs SDK to run event-driven code in Azure.
12
12
---
@@ -838,7 +838,7 @@ The attribute can be declared at the parameter, method, or class level. The sett
838
838
839
839
### Timeout attribute
840
840
841
-
The [`Timeout`](https://github.com/Azure/azure-webjobs-sdk/blob/master/src/Microsoft.Azure.WebJobs/TimeoutAttribute.cs) attribute causes a function to be canceled if it doesn't finish within a specified amount of time. In the following example, the function would run for one day without the `Timeout` attribute. Time-out causes the function to be canceled after 15 seconds. When the `Timeout` attribute `throwOnError` parameter is set to `true`, the function invocation is terminated by having an exception thrown by the WebJobs SDK when the time-out interval is exceeded. The default value of `throwOnError` is `false`. When the `Timeout` attribute is used, the default behavior is to cancel the function invocation by setting the cancellation token while allowing the invocation to run indefinitely until the function code returns or throws an exception.
841
+
The [`Timeout`](https://github.com/Azure/azure-webjobs-sdk/blob/master/src/Microsoft.Azure.WebJobs/TimeoutAttribute.cs) attribute causes a function to be canceled if it doesn't finish within a specified amount of time. In the following example, the function would run for one day without the `Timeout` attribute. Timeout causes the function to be canceled after 15 seconds. When the `Timeout` attribute `throwOnError` parameter is set to `true`, the function invocation is terminated by having an exception thrown by the WebJobs SDK when the timeout interval is exceeded. The default value of `throwOnError` is `false`. When the `Timeout` attribute is used, the default behavior is to cancel the function invocation by setting the cancellation token while allowing the invocation to run indefinitely until the function code returns or throws an exception.
842
842
843
843
```csharp
844
844
[Timeout("00:00:15")]
@@ -853,7 +853,7 @@ public static async Task TimeoutJob(
853
853
}
854
854
```
855
855
856
-
You can apply the `Timeout` attribute at the class level or the method level, and you can specify a global time-out by using `JobHostConfiguration.FunctionTimeout`. Class-level or method-level time-outs override global time-outs.
856
+
You can apply the `Timeout` attribute at the class level or the method level, and you can specify a global timeout by using `JobHostConfiguration.FunctionTimeout`. Class-level or method-level timeouts override global timeouts.
857
857
858
858
### Singleton attribute
859
859
@@ -976,7 +976,7 @@ Version 3.*x* of the SDK relies on the filtering that's built into .NET Core. Us
976
976
usingMicrosoft.Azure.WebJobs.Logging;
977
977
```
978
978
979
-
The following example constructs a filter that, by default, filters all logs at the `Warning` level. The `Function` and `results` categories (equivalent to `Host.Results` in version 2.*x*) are filtered at the `Error` level. The filter compares the current category to all registered levels in the `LogCategories` instance and chooses the longest match. The `Debug` level registered for `Host.Triggers` then matches `Host.Triggers.Queue` or `Host.Triggers.Blob`. You can control broader categories without needing to add each one.
979
+
The following example constructs a filter that, by default, filters all logs at the `Warning` level. The `Function` and `results` categories (equivalent to `Host.Results` in version 2.*x*) are filtered at the `Error` level. The filter compares the current category to all registered levels in the `LogCategories` instance and chooses the longest match. So the `Debug` level registered for `Host.Triggers` matches `Host.Triggers.Queue` or `Host.Triggers.Blob`. You can control broader categories without needing to add each one.
980
980
981
981
```csharp
982
982
staticasyncTaskMain(string[] args)
@@ -1009,7 +1009,7 @@ In version 2.*x* of the SDK, you use the `LogCategoryFilter` class to control fi
1009
1009
1010
1010
As with `LogCategories` in version 3.*x*, the `CategoryLevels` property allows you to specify log levels for specific categories so you can fine-tune the logging output. If no match is found within the `CategoryLevels` dictionary, the filter falls back to the `Default` value when determining whether to filter the message.
1011
1011
1012
-
The following example constructs a filter that by default filters all logs at the `Warning` level. The `Function` and `Host.Results` categories are filtered at the `Error` level. The `LogCategoryFilter` compares the current category to all registered `CategoryLevels` and chooses the longest match. The `Debug` level registered for `Host.Triggers` then matches `Host.Triggers.Queue` or `Host.Triggers.Blob`. You can control broader categories without needing to add each one.
1012
+
The following example constructs a filter that by default filters all logs at the `Warning` level. The `Function` and `Host.Results` categories are filtered at the `Error` level. The `LogCategoryFilter` compares the current category to all registered `CategoryLevels` and chooses the longest match. So the `Debug` level registered for `Host.Triggers` matches `Host.Triggers.Queue` or `Host.Triggers.Blob`. You can control broader categories without needing to add each one.
0 commit comments