| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod LogSnapshot (const KpiSnapshotData snapshotData) | 
| { | 
|   Description: | 
|   [* | 
|     CAN EXTEND | Logs the kpis to a standard logger. Extend if you want to disable the logging or change the way it is logged (e.g. add additional label slots). | 
|     Note - this format is used by the Delmia Hosted Services monitoring solution - it is not recommended to change the logging format if you plan on utilizing the monitoring solution. | 
|   *] | 
|   TextBody: | 
|   [* | 
|     // Note - this format is used by the Delmia Hosted Services monitoring solution - it is not recommended to change the logging format if you plan on utilizing the monitoring solution. | 
|      | 
|     logkpis := guard( SettingsEngine::SettingsEngine().SettingsHolder().SettingEntryBooleanValue( "kpitracker.logkpis" ), false ); | 
|     if( logkpis ) | 
|     { | 
|       na          := Translations::Kpi_Logger_NA(); | 
|       labels      := selectsortedset( snapshotData, Label, l, true, l.Name() ); | 
|       labelNames  := selectvalues( labels, Elements, l, true, l.Name() ); | 
|       labelValues := selectvalues( labels, Elements, l, true, l.Value() ); | 
|       kpis        := selectsortedset( snapshotData, Value, kpi, true, kpi.Name() ); | 
|        | 
|       traverse( kpis, Elements, kpi ) | 
|       { | 
|         LoggerKpiSnapshot::Info( snapshotData.PlanDateTime(), | 
|                                  kpi.Name(), | 
|                                  kpi.Value(), | 
|                                  guard( labelNames.Element( 0 ), na ), | 
|                                  guard( labelValues.Element( 0 ), na ), | 
|                                  guard( labelNames.Element( 1 ), na ), | 
|                                  guard( labelValues.Element( 1 ), na ), | 
|                                  guard( labelNames.Element( 2 ), na ), | 
|                                  guard( labelValues.Element( 2 ), na ), | 
|                                  guard( labelNames.Element( 3 ), na ), | 
|                                  guard( labelValues.Element( 3 ), na ), | 
|                                  guard( labelNames.Element( 4 ), na ), | 
|                                  guard( labelValues.Element( 4 ), na ), | 
|                                  '' ); | 
|       } | 
|     } | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Extensible' } | 
| } |