Skip to content

Commit 50bfb22

Browse files
committed
Fix typo and wrong function
1 parent 42db115 commit 50bfb22

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

16/umbraco-cms/fundamentals/backoffice/logviewer.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ public class AzureTableLogsService : LogViewerServiceBase
164164
}
165165

166166
// Change this to what you think is sensible
167-
// as an example we check whether more than 5 days logs are requested
167+
// as an example we check whether more than 5 days off logs are requested
168168
public override Task<Attempt<bool, LogViewerOperationStatus>> CanViewLogsAsync(LogTimePeriod logTimePeriod)
169169
{
170170
return logTimePeriod.EndTime - logTimePeriod.StartTime < TimeSpan.FromDays(5)
171171
? Task.FromResult(Attempt.SucceedWithStatus(LogViewerOperationStatus.Success, true))
172-
: Task.FromResult(Attempt.SucceedWithStatus(LogViewerOperationStatus.CancelledByLogsSizeValidation, false));
172+
: Task.FromResult(Attempt.FailWithStatus(LogViewerOperationStatus.CancelledByLogsSizeValidation, false));
173173
}
174174

175175
public override ReadOnlyDictionary<string, LogLevel> GetLogLevelsFromSinks()
@@ -211,23 +211,24 @@ public class AzureTableLogsComposer : IComposer
211211

212212
With the above two classes, the setup is in place to view logs from an Azure Table. However, logs are not yet persisted into the Azure Table Storage account. To enable persistence, configure the Serilog logging pipeline to store logs in Azure Table Storage.
213213

214-
* Install `Serilog.Sinks.AzureTableStorage` from NuGet.
215-
* Add a new sink to `appsettings.json` with credentials to persist logs to Azure.
214+
- Install `Serilog.Sinks.AzureTableStorage` from NuGet.
215+
- Add a new sink to `appsettings.json` with credentials to persist logs to Azure.
216216

217217
The following sink needs to be added to the [`Serilog:WriteTo`](https://github.com/serilog/serilog-sinks-azuretablestorage#json-configuration) array.
218218

219219
```json
220220
{
221-
"Name": "AzureTableStorage",
222-
"Args": {
223-
"storageTableName": "LogEventEntity",
224-
"formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact",
225-
"connectionString": "DefaultEndpointsProtocol=https;AccountName=ACCOUNT_NAME;AccountKey=KEY;EndpointSuffix=core.windows.net"}
221+
"Name": "AzureTableStorage",
222+
"Args": {
223+
"storageTableName": "LogEventEntity",
224+
"formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact",
225+
"connectionString": "DefaultEndpointsProtocol=https;AccountName=ACCOUNT_NAME;AccountKey=KEY;EndpointSuffix=core.windows.net"
226+
}
226227
}
227228
```
228229

229230
For more in-depth information about logging and how to configure it, see the [Logging](../code/debugging/logging.md) article.
230231

231232
### Compact Log Viewer - Desktop App
232233

233-
[Compact Log Viewer](https://www.microsoft.com/store/apps/9N8RV8LKTXRJ?cid=storebadge\&ocid=badge). A desktop tool is available for viewing and querying JSON log files in the same way as the built-in Log Viewer in Umbraco.
234+
[Compact Log Viewer](https://www.microsoft.com/store/apps/9N8RV8LKTXRJ?cid=storebadge&ocid=badge). A desktop tool is available for viewing and querying JSON log files in the same way as the built-in Log Viewer in Umbraco.

0 commit comments

Comments
 (0)