« LogEvent (rtl) » : différence entre les versions
(Page créée avec « <source lang='delphi'>function logEvent(const iCategory,iAction,iLabel:string; iValue:Integer; iMetric:Integer):boolean;</source> Cette fonction permet d'émettre un év... ») |
Aucun résumé des modifications |
||
Ligne 24 : | Ligne 24 : | ||
|} | |} | ||
Exemple | Cet évènement positionne les attributs suivants : | ||
{|class="wikitable" | |||
|- | |||
!Nom de l'attribut | |||
!Valeur de l'attribut | |||
|- | |||
|actionCategory | |||
|iCategory | |||
|- | |||
|actionName | |||
|iAction | |||
|- | |||
|actionLabel | |||
|iLabel | |||
|- | |||
|actionValue | |||
|iValue | |||
|- | |||
|actionValue1 | |||
|iMetric | |||
|} | |||
Ces attributs peuvent être utilisé dans les handlers d'évènement. | |||
Exemple : | |||
Voici la déclaration du handler envoyant ce type d'évènement vers Google Analytics. | |||
<pre> | |||
[\SOFTWARE\Sage\Ligne 1000\Administration\LOGManager\GA_EVENT] | |||
type = http | |||
url = http://www.google-analytics.com/collect | |||
method = POST | |||
contentType = application/x-www-form-urlencoded | |||
accept = application/text | |||
keep-alive = 0 | |||
categories = sysevent,confevent,taskevent,processevent,event | |||
content = t=event&v=1&tid=[gaUA]&cid=[DeviceID]&cd1=[CustomerID]&cd2=[appName]-[appVersion]&cd3=[id]&cd4=[UserID]&cd5=[systemOSInfoEx]& \ | |||
ec=[actionCategory]&ea=[actionName]&el=[actionLabel]&ev=[actionValue]&cm1=[actionValue1] | |||
</pre> | |||
<source lang='delphi'> | <source lang='delphi'> | ||
begin | begin | ||
logEvent('process','TProcessusComptabilisation','Nbr. pièce',100,0); | |||
end; | end; | ||
</source> | </source> | ||
Ligne 33 : | Ligne 76 : | ||
Voir aussi: | Voir aussi: | ||
* [[logTiming (rtl)|logTiming]] | |||
{{Footer|Gestion_des_logs_(server)}} | {{Footer|Gestion_des_logs_(server)}} | ||
[[category:Logger]] | [[category:Logger]] | ||
[[category:latest]] | [[category:latest]] |
Version du 22 juillet 2014 à 13:41
<source lang='delphi'>function logEvent(const iCategory,iAction,iLabel:string; iValue:Integer; iMetric:Integer):boolean;</source>
Cette fonction permet d'émettre un évènement vers l'enregistreur de log.
Result | True : L'évènement a été transmis |
iCategory | Catégorie de l'évènement. |
iAction | Action associé à l'évènement. |
iLabel | Libellé associé à l'évènement. |
iValue | Valeur associée à l'évènement. |
iMetric | Valeur supplémentaire associée à l'évènement. |
Cet évènement positionne les attributs suivants :
Nom de l'attribut | Valeur de l'attribut |
---|---|
actionCategory | iCategory |
actionName | iAction |
actionLabel | iLabel |
actionValue | iValue |
actionValue1 | iMetric |
Ces attributs peuvent être utilisé dans les handlers d'évènement.
Exemple :
Voici la déclaration du handler envoyant ce type d'évènement vers Google Analytics.
[\SOFTWARE\Sage\Ligne 1000\Administration\LOGManager\GA_EVENT] type = http url = http://www.google-analytics.com/collect method = POST contentType = application/x-www-form-urlencoded accept = application/text keep-alive = 0 categories = sysevent,confevent,taskevent,processevent,event content = t=event&v=1&tid=[gaUA]&cid=[DeviceID]&cd1=[CustomerID]&cd2=[appName]-[appVersion]&cd3=[id]&cd4=[UserID]&cd5=[systemOSInfoEx]& \ ec=[actionCategory]&ea=[actionName]&el=[actionLabel]&ev=[actionValue]&cm1=[actionValue1]
<source lang='delphi'>
begin
logEvent('process','TProcessusComptabilisation','Nbr. pièce',100,0);
end; </source>
Voir aussi:
{{#if:Gestion_des_logs_(server)|
{{#if:Gestion_des_logs_(server)|— Gestion_des_logs_(server) |}} — Développement DSM —
|
{{#if:|— [[{{{1}}}]] |}} — Développement DSM —
}}