Skip to content

Commit e42ab75

Browse files
authored
Merge pull request #108448 from mgreenegit/patch-1
Log location update
2 parents 2a6fe11 + 574697c commit e42ab75

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/governance/policy/concepts/guest-configuration.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ file format can be renamed to '.zip' to uncompress and review.
209209

210210
The Guest Configuration extension writes log files to the following locations:
211211

212-
Windows: `C:\Packages\Plugins\Microsoft.GuestConfiguration.ConfigurationforWindows\<version>\dsc\logs\dsc.log`
212+
Windows: `C:\ProgramData\GuestConfig\gc_agent_logs\gc_agent.log`
213213

214-
Linux: `/var/lib/waagent/Microsoft.GuestConfiguration.ConfigurationforLinux-<version>/GCAgent/logs/dsc.log`
214+
Linux: `/var/lib/GuestConfig/gc_agent_logs/gc_agent.log`
215215

216216
Where `<version>` refers to the current version number.
217217

@@ -231,8 +231,8 @@ machines, the following example PowerShell script can be helpful. For more infor
231231
```powershell
232232
$linesToIncludeBeforeMatch = 0
233233
$linesToIncludeAfterMatch = 10
234-
$latestVersion = Get-ChildItem -Path 'C:\Packages\Plugins\Microsoft.GuestConfiguration.ConfigurationforWindows\' | ForEach-Object {$_.FullName} | Sort-Object -Descending | Select-Object -First 1
235-
Select-String -Path "$latestVersion\dsc\logs\dsc.log" -pattern 'DSCEngine','DSCManagedEngine' -CaseSensitive -Context $linesToIncludeBeforeMatch,$linesToIncludeAfterMatch | Select-Object -Last 10
234+
$logPath = 'C:\ProgramData\GuestConfig\gc_agent_logs\gc_agent.log'
235+
Select-String -Path $logPath -pattern 'DSCEngine','DSCManagedEngine' -CaseSensitive -Context $linesToIncludeBeforeMatch,$linesToIncludeAfterMatch | Select-Object -Last 10
236236
```
237237

238238
#### Linux
@@ -244,8 +244,8 @@ the following example Bash script can be helpful. For more information, see
244244
```Bash
245245
linesToIncludeBeforeMatch=0
246246
linesToIncludeAfterMatch=10
247-
latestVersion=$(find /var/lib/waagent/ -type d -name "Microsoft.GuestConfiguration.ConfigurationforLinux-*" -maxdepth 1 -print | sort -z | sed -n 1p)
248-
egrep -B $linesToIncludeBeforeMatch -A $linesToIncludeAfterMatch 'DSCEngine|DSCManagedEngine' "$latestVersion/GCAgent/logs/dsc.log" | tail
247+
logPath=/var/lib/GuestConfig/gc_agent_logs/gc_agent.log
248+
egrep -B $linesToIncludeBeforeMatch -A $linesToIncludeAfterMatch 'DSCEngine|DSCManagedEngine' $logPath | tail
249249
```
250250

251251
## Guest Configuration samples

0 commit comments

Comments
 (0)