Your Extension Attributes Automation Worker Service now supports CMTrace formatting - the industry standard for enterprise logging used by Microsoft System Center, Configuration Manager, and Intune administrators.
- ? Perfect CMTrace Format - Compatible with CMTrace.exe and OneTrace
- ? Component-Based Logging - Each service component has its own identifier
- ? XML-Safe Content - Proper escaping of special characters
- ? Threaded Logging - Thread ID tracking for concurrent operations
- ? Source File Tracking - File and line number information when available
- ? Standard Logs - Human-readable structured logs
- ? CMTrace Logs - Enterprise-compatible format
- ? Console Output - Development-friendly colorized output
- ? Component Separation - Different components can be filtered/analyzed separately
{
"Logging": {
"CMTrace": {
"Enabled": true,
"Path": "C:\\Temp\\Automation\\Logs",
"ApplicationName": "ExtensionAttributesWorker"
}
}
}Copy appsettings.CMTrace.json to appsettings.json or use environment-specific config:
# Use CMTrace configuration
copy appsettings.CMTrace.json appsettings.Production.jsonC:\Temp\Automation\Logs\ExtensionAttributes.Structured.log
- Human-readable format
- Good for development and basic troubleshooting
C:\Temp\Automation\Logs\ExtensionAttributes.CMTrace.log
- Enterprise CMTrace format
- Perfect for System Center administrators
- Compatible with CMTrace.exe and OneTrace
- Download CMTrace.exe from Microsoft
- Open:
C:\Temp\Automation\Logs\ExtensionAttributes.CMTrace.log - Filter by component, severity, or time range
- Available with Windows 10/11 or downloadable
- Advanced filtering and analysis capabilities
- Real-time log monitoring
Install CMTrace extension for VS Code to view logs with syntax highlighting.
Your logs are organized by component for easy filtering:
| Component | Description | Example Log Entries |
|---|---|---|
| IntuneHelper | Intune device operations | Device retrieval, app inventory, compliance checks |
| EntraADHelper | Entra AD operations | Device updates, extension attribute writes |
| ADHelper | Active Directory operations | Computer object queries, OU searches |
| UnifiedExtensionAttributeHelper | Main processing logic | Device processing workflows, mapping execution |
| QuartzJob | Scheduled job execution | Job triggers, completion status |
| HealthCheck | System health monitoring | Component health, dependency checks |
| GraphApiAuth | Authentication handling | Token acquisition, renewal, errors |
<![LOG[Successfully retrieved device details - Name: DESKTOP-ABC123, OS: Windows, Compliance: Compliant]LOG]!><time="14:30:25.123+100" date="01-15-2025" component="IntuneHelper" context="" type="1" thread="1234" file="IntuneHelper.cs:67"><![LOG[Rate limited for REST API call: /beta/deviceManagement/managedDevices - Status: TooManyRequests, Retry-After: 30s]LOG]!><time="14:30:26.456+100" date="01-15-2025" component="IntuneHelper" context="" type="2" thread="1234" file="IntuneHelper.cs:234"><![LOG[Authentication failed for REST API call: /beta/deviceManagement/managedDevices - Status: Unauthorized, Duration: 1250ms]LOG]!><time="14:30:27.789+100" date="01-15-2025" component="IntuneHelper" context="" type="3" thread="1234" file="IntuneHelper.cs:189">| Serilog Level | CMTrace Type | Description | Usage |
|---|---|---|---|
| Verbose | 1 (Info) | Detailed execution flow | Development debugging |
| Debug | 1 (Info) | Diagnostic information | Troubleshooting |
| Information | 1 (Info) | General operational info | Normal operations |
| Warning | 2 (Warning) | Non-critical issues | Attention needed |
| Error | 3 (Error) | Error conditions | Immediate attention |
| Fatal | 3 (Error) | Critical failures | System failure |
// In your service classes
var componentLogger = Log.ForContext("Component", "MyCustomComponent");
componentLogger.Information("Custom component operation completed");// Built-in performance tracking in REST API calls
_cmtraceLogger.Information("Graph API REST call succeeded: {Method} {Endpoint} - Status: {StatusCode}, Duration: {Duration}ms",
method, endpoint, response.StatusCode, stopwatch.ElapsedMilliseconds);// Structured operation summaries
LoggingService.LogOperationSummary("ExtensionAttributeProcessing", 150, 147, 3, TimeSpan.FromMinutes(5));- Configuration Manager - Familiar log format for ConfigMgr admins
- Intune Administration - Same log format as Intune management tools
- SCCM Troubleshooting - Consistent with existing enterprise tools
- Component Filtering - Isolate specific service components
- Time-based Analysis - Precise timestamp correlation
- Thread Tracking - Follow concurrent operations
- Performance Metrics - Built-in duration tracking for API calls
- Standardized Format - Same format across all Microsoft enterprise tools
- Easy Knowledge Transfer - Familiar to System Center administrators
- Consistent Terminology - Same log structure as ConfigMgr/Intune
{
"Logging": {
"CMTrace": {
"Enabled": true
}
}
}ExtensionAttributes.WorkerSvc.exe --service- Download CMTrace.exe
- Open:
C:\Temp\Automation\Logs\ExtensionAttributes.CMTrace.log - Set up filters for specific components
- Filter by IntuneHelper for device operations
- Filter by EntraADHelper for extension attribute updates
- Filter by Type 3 for errors only
- Filter by time range for specific incidents
Your Extension Attributes Automation Worker Service now provides enterprise-grade logging that integrates seamlessly with existing Microsoft System Center administration workflows! ???
Perfect for:
- ?? Enterprise IT Departments
- ?? System Center Administrators
- ?? Intune Device Management Teams
- ?? DevOps and Monitoring Teams