LogEvent (rtl)
De Wiki1000
(Différences 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... ») |
|||
| 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 à 14:41
function logEvent(const iCategory,iAction,iLabel:string; iValue:Integer; iMetric:Integer):boolean;
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]
begin logEvent('process','TProcessusComptabilisation','Nbr. pièce',100,0); end;
Voir aussi:
| Whos here now: Members 0 Guests 0 Bots & Crawlers 2 |