Skip to content

Commit 6d7ded5

Browse files
Extra logging
1 parent b805ce6 commit 6d7ded5

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Modules/CippEntrypoints/CippEntrypoints.psm1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,15 @@ function Receive-CippActivityTrigger {
278278
try {
279279
$Output = $null
280280
Set-Location (Get-Item $PSScriptRoot).Parent.Parent.FullName
281+
$metric = @{
282+
Kind = 'CIPPCommandStart'
283+
Command = $Item.Command
284+
Tenant = $Item.TenantFilter.defaultDomainName
285+
TaskName = $Item.TaskName
286+
JSONData = ($Item | ConvertTo-Json -Depth 10 -Compress)
287+
}
281288

289+
Write-Information -MessageData $metric -Tag 'CIPPCommandStart'
282290
if ($Item.QueueId) {
283291
if ($Item.QueueName) {
284292
$QueueName = $Item.QueueName

host.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
"version": "[4.26.0, 5.0.0)"
99
},
1010
"functionTimeout": "00:10:00",
11+
12+
"logging": {
13+
"console": {
14+
"isEnabled": true,
15+
"enableStructuredLogging": true
16+
}
17+
},
1118
"extensions": {
1219
"durableTask": {
1320
"maxConcurrentActivityFunctions": 1,

0 commit comments

Comments
 (0)