LogEvent (rtl)
{{#images:versionlatest-32x32.png|stock}} <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 —
}}