ComposantsComponents

ComposantsComponents › Logs & ErreursLogs & Errors

tStatCatcher

tStatCatcher

Logs & ErreursLogs & Errors

Produit le journal d'exécution du job : une ligne au début et une à la fin du job, avec sa durée et son résultat (success ou failure), et les mêmes lignes pour chaque composant dont la case Statistiques du tStatCatcher est cochée. Le schéma est fixe. Il se pose à part, sans lien entrant, et se relie à un tLogRow, un fichier ou une table. Produces the run log of the job: one row at the start and one at the end of the job, with its duration and its result (success or failure), and the same rows for each component whose tStatCatcher Statistics box is checked. The schema is fixed. It is placed apart, with no incoming link, and connects to a tLogRow, a file or a table.

EntréeInput

Aucun flux. Il commence son sous-job, que le job lance pour lui à chaque message. No flow. It starts its subjob, which the job runs for it at each message.

SortieOutput

Un lien Main : une ligne par message, au schéma fixe de 14 colonnes. Ou un lien Iterate. One Main link: one row per message, with the fixed schema of 14 columns. Or one Iterate link.

Déclencheurs en sortieOutput triggers

On Subjob Ok On Subjob Error On Component Ok On Component Error Run if

UtilisationUsage

row1 (Main) row2 (Main) row3 (Main) tFileInputDelimited_1 tMap_1 tDBOutput_1 tStatCatcher_1 tDBOutput_2

✓ : la case Statistiques du tStatCatcher du composant est cochée. Le tStatCatcher reçoit le début et la fin du job, et le début et la fin de chaque composant coché ; le tMap, non coché, n'apparaît pas. ✓: the tStatCatcher Statistics box of the component is checked. The tStatCatcher receives the start and the end of the job, and the start and the end of each checked component; the tMap, not checked, does not appear.

  1. Déposez le tStatCatcher depuis la famille Logs & Erreurs, à l'écart du traitement, et reliez sa sortie Main à la destination du journal. Drop the tStatCatcher from the Logs & Errors family, away from the processing, and connect its Main output to the destination of the log.
  2. Pour chaque composant à suivre, ouvrez l'onglet Paramètres avancés et cochez Statistiques du tStatCatcher. Sans aucune case cochée, le journal contient déjà les deux lignes du job. For each component to follow, open the Advanced settings tab and check tStatCatcher Statistics. With no box checked, the log already holds the two rows of the job.
  3. Vers un fichier, cochez Écrire à la suite de dans le composant de sortie : le sous-job du tStatCatcher est exécuté à chaque message. To a file, check Append in the output component: the subjob of the tStatCatcher is run at each message.

ParamètresSettings

Le tStatCatcher n'a qu'un paramètre, son schéma. Ce qu'il reçoit se règle sur les autres composants, par une case que le Studio ajoute à chacun d'eux. The tStatCatcher has a single setting, its schema. What it receives is set on the other components, through a box the Studio adds to each of them.

ParamètreSetting DéfautDefault VisibleShown Description
SchémaSchemaSCHEMA 14 colonnes14 columns Toujours, sur le tStatCatcherAlways, on the tStatCatcher En lecture seule : les colonnes sont fixées par le composant. Read-only: the columns are set by the component.
Statistiques du tStatCatchertStatCatcher StatisticsTSTATCATCHER_STATS NonNo Sur chaque autre composant, onglet Paramètres avancésOn every other component, Advanced settings tab Le composant envoie une ligne begin quand il démarre et une ligne end quand il a fini, avec sa durée. Sans tStatCatcher dans le job, la case n'a aucun effet. Le tStatCatcher lui-même n'a pas cette case. The component sends a begin row when it starts and an end row when it is done, with its duration. Without a tStatCatcher in the job, the box has no effect. The tStatCatcher itself does not have this box.

Les libellés Capturer les tDie, Capturer les tWarn et Capturer l'arrêt Perl existent dans les fichiers de messages du composant, mais aucun paramètre ne leur correspond : ils ne sont pas affichés. The Catch tDie, Catch tWarn and Catch Perl die labels exist in the message files of the component, but no setting matches them: they are not displayed.

Le schéma fixeThe fixed schema

Colonnes du tStatCatcher_java.xml, dans l'ordre. Contenu lu dans les modèles et vérifié sur les exécutions de cette page. Columns of tStatCatcher_java.xml, in order. Content read from the templates and checked on the runs of this page.

ColonneColumn Type ContenuContent
momentDate "yyyy-MM-dd HH:mm:ss"date et heure du messagedate and time of the message
pidString (20)identifiant de l'exécution : six caractères tirés au hasard au lancement du jobidentifier of the run: six characters drawn at random when the job starts
father_pidString (20)identifiant du job parent ; celui du job lui-même s'il n'a pas de parentidentifier of the parent job; that of the job itself if it has no parent
root_pidString (20)identifiant du premier job de la chaîne ; celui du job lui-même s'il est lancé seulidentifier of the first job of the chain; that of the job itself if it is started alone
system_pidLongnuméro du processus Java dans le systèmenumber of the Java process in the system
projectString (50)nom technique du projettechnical name of the project
jobString (255)nom du jobname of the job
job_repository_idString (255)identifiant du job dans le référentiel du projetidentifier of the job in the project repository
job_versionString (255)version du job : 0.1version of the job: 0.1
contextString (50)environnement de contexte de l'exécution : Defaultcontext environment of the run: Default
originString (255)nom du composant (tJava_1) ; null pour les lignes du jobname of the component (tJava_1); null for the rows of the job
message_typeString (255)begin ouor end
messageString (255)null au début ; à la fin, success ou failurenull at the start; at the end, success or failure
durationLongnull au début ; à la fin, durée en millisecondes du composant ou du jobnull at the start; at the end, duration in milliseconds of the component or of the job

Un job lancé par un autre reçoit father_pid et root_pid par les arguments --father_pid= et --root_pid= (lu dans le code généré ; aucun job enfant n'a été exécuté pour cette page). Le composant n'a pas de variable globale (RETURNS vide). A job started by another one receives father_pid and root_pid through the --father_pid= and --root_pid= arguments (read from the generated code; no child job was run for this page). The component has no global variable (empty RETURNS).

ExemplesExamples

Sorties copiées depuis une exécution de chaque job ; les traces Java sont abrégées (…). Les valeurs de moment, pid, father_pid, root_pid, system_pid et duration changent à chaque exécution ; project, job et job_repository_id sont ceux du job d'essai. Sauf mention, le tStatCatcher est relié à un tLogRow en mode Simple, où null s'écrit comme un champ vide. Outputs copied from a run of each job; the Java traces are shortened (…). The values of moment, pid, father_pid, root_pid, system_pid and duration change at each run; project, job and job_repository_id are those of the test job. Unless stated, the tStatCatcher is connected to a tLogRow in Basic mode, where null is written as an empty field.

Un composant cochéOne checked component

row1 (Main) tJava_1 tStatCatcher_1 tLogRow_1
// tJava_1
Thread.sleep(300);
System.out.println("Work done");
2026-11-18 14:33:27|zeYCJw|zeYCJw|zeYCJw|48508|DEMO|JOB_DocLB_S8|_WLh0V5igyByRFaO9W3M6iB|0.1|Default||begin||
2026-11-18 14:33:27|zeYCJw|zeYCJw|zeYCJw|48508|DEMO|JOB_DocLB_S8|_WLh0V5igyByRFaO9W3M6iB|0.1|Default|tJava_1|begin||
Work done
2026-11-18 14:33:28|zeYCJw|zeYCJw|zeYCJw|48508|DEMO|JOB_DocLB_S8|_WLh0V5igyByRFaO9W3M6iB|0.1|Default|tJava_1|end|success|303
2026-11-18 14:33:28|zeYCJw|zeYCJw|zeYCJw|48508|DEMO|JOB_DocLB_S8|_WLh0V5igyByRFaO9W3M6iB|0.1|Default||end|success|325

Première et dernière lignes : le job (origin vide). Entre les deux, le début et la fin de tJava_1 : 303 ms pour une pause de 300 ms. La durée du job, 325 ms, est comptée depuis son démarrage. First and last rows: the job (empty origin). In between, the start and the end of tJava_1: 303 ms for a 300 ms pause. The duration of the job, 325 ms, is counted from its start.

Deux composants d'un fluxTwo components of a flow

row1 (Main) tFixedFlowInput_1 tLogRow_1

Deux lignes name, amount : pen 12, ink 3. Le tStatCatcher est relié à tLogRow_2. Two name, amount rows: pen 12, ink 3. The tStatCatcher is connected to tLogRow_2.

2026-11-18 14:34:08|nng7HU|nng7HU|nng7HU|77468|DEMO|JOB_DocLB_T1|_op1aZBQyaPUCEBG-859dBA|0.1|Default||begin||
2026-11-18 14:34:08|nng7HU|nng7HU|nng7HU|77468|DEMO|JOB_DocLB_T1|_op1aZBQyaPUCEBG-859dBA|0.1|Default|tLogRow_1|begin||
2026-11-18 14:34:08|nng7HU|nng7HU|nng7HU|77468|DEMO|JOB_DocLB_T1|_op1aZBQyaPUCEBG-859dBA|0.1|Default|tFixedFlowInput_1|begin||
pen|12
ink|3
2026-11-18 14:34:08|nng7HU|nng7HU|nng7HU|77468|DEMO|JOB_DocLB_T1|_op1aZBQyaPUCEBG-859dBA|0.1|Default|tFixedFlowInput_1|end|success|1
2026-11-18 14:34:08|nng7HU|nng7HU|nng7HU|77468|DEMO|JOB_DocLB_T1|_op1aZBQyaPUCEBG-859dBA|0.1|Default|tLogRow_1|end|success|1
2026-11-18 14:34:08|nng7HU|nng7HU|nng7HU|77468|DEMO|JOB_DocLB_T1|_op1aZBQyaPUCEBG-859dBA|0.1|Default||end|success|22

Dans un flux, la sortie est préparée avant l'entrée : le begin du tLogRow_1 précède celui du tFixedFlowInput_1. Les fins viennent dans l'ordre du flux. Il n'y a pas de ligne par ligne de données : seulement le début et la fin de chaque composant. In a flow, the output is prepared before the input: the begin of tLogRow_1 comes before that of tFixedFlowInput_1. The ends come in flow order. There is no row per data row: only the start and the end of each component.

Aucune case cochée, tLogRow en mode TableNo box checked, tLogRow in Table mode

Le même flux, sans aucune case cochée : The same flow, with no box checked:

.-------------------+------+----------+--------+----------+-------+------------+-----------------------+-----------+-------+------+------------+-------+--------.
|                                                                           tLogRow_2                                                                           |
|=------------------+------+----------+--------+----------+-------+------------+-----------------------+-----------+-------+------+------------+-------+-------=|
|moment             |pid   |father_pid|root_pid|system_pid|project|job         |job_repository_id      |job_version|context|origin|message_type|message|duration|
|=------------------+------+----------+--------+----------+-------+------------+-----------------------+-----------+-------+------+------------+-------+-------=|
|2026-11-18 14:33:12|QIjlxy|QIjlxy    |QIjlxy  |77692     |DEMO   |JOB_DocLB_S2|_XvtsY1eKSVwIuDhQElBWXD|0.1        |Default|null  |begin       |null   |null    |
'-------------------+------+----------+--------+----------+-------+------------+-----------------------+-----------+-------+------+------------+-------+--------'

pen|12
ink|3
.-------------------+------+----------+--------+----------+-------+------------+-----------------------+-----------+-------+------+------------+-------+--------.
|                                                                           tLogRow_2                                                                           |
|=------------------+------+----------+--------+----------+-------+------------+-----------------------+-----------+-------+------+------------+-------+-------=|
|moment             |pid   |father_pid|root_pid|system_pid|project|job         |job_repository_id      |job_version|context|origin|message_type|message|duration|
|=------------------+------+----------+--------+----------+-------+------------+-----------------------+-----------+-------+------+------------+-------+-------=|
|2026-11-18 14:33:12|QIjlxy|QIjlxy    |QIjlxy  |77692     |DEMO   |JOB_DocLB_S2|_XvtsY1eKSVwIuDhQElBWXD|0.1        |Default|null  |end         |success|23      |
'-------------------+------+----------+--------+----------+-------+------------+-----------------------+-----------+-------+------+------------+-------+--------'

Les deux lignes du job sont toujours produites. Chaque message a son propre tableau : le sous-job du tStatCatcher est exécuté une fois par message. À l'inverse, des cases cochées dans un job sans tStatCatcher ne produisent rien : ce flux n'écrit alors que pen|12 et ink|3. The two rows of the job are always produced. Each message has its own table: the subjob of the tStatCatcher is run once per message. Conversely, boxes checked in a job without a tStatCatcher produce nothing: this flow then only writes pen|12 and ink|3.

Un composant qui échoueA component that fails

row1 (Main) OnSubjobOk tFixedFlowInput_1 tLogRow_1 tJava_1
// tJava_1
Thread.sleep(250);
int n = Integer.parseInt("abc");
2026-11-18 14:34:11|Akc4ep|Akc4ep|Akc4ep|58908|DEMO|JOB_DocLB_T5|_X7ul98dYVod9wKqGEgkpsC|0.1|Default||begin||
2026-11-18 14:34:11|Akc4ep|Akc4ep|Akc4ep|58908|DEMO|JOB_DocLB_T5|_X7ul98dYVod9wKqGEgkpsC|0.1|Default|tFixedFlowInput_1|begin||
pen|12
ink|3
2026-11-18 14:34:11|Akc4ep|Akc4ep|Akc4ep|58908|DEMO|JOB_DocLB_T5|_X7ul98dYVod9wKqGEgkpsC|0.1|Default|tFixedFlowInput_1|end|success|0
2026-11-18 14:34:11|Akc4ep|Akc4ep|Akc4ep|58908|DEMO|JOB_DocLB_T5|_X7ul98dYVod9wKqGEgkpsC|0.1|Default|tJava_1|begin||
Exception in component tJava_1 (JOB_DocLB_T5)
java.lang.NumberFormatException: For input string: "abc"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
	…
2026-11-18 14:34:11|Akc4ep|Akc4ep|Akc4ep|58908|DEMO|JOB_DocLB_T5|_X7ul98dYVod9wKqGEgkpsC|0.1|Default|tJava_1|end|failure|267
2026-11-18 14:34:11|Akc4ep|Akc4ep|Akc4ep|58908|DEMO|JOB_DocLB_T5|_X7ul98dYVod9wKqGEgkpsC|0.1|Default||end|failure|288

Le composant en erreur et le job reçoivent chacun une ligne end de message failure, avec la durée jusqu'à l'erreur. Le job se termine avec le code 1. Si le tJava n'est pas coché, seule la ligne du job dit failure. The failing component and the job each receive an end row with the failure message, with the duration up to the error. The job ends with code 1. If the tJava is not checked, only the row of the job says failure.

Erreur traitée par On Component ErrorError handled by On Component Error

OnComponentError tJava_1 tJava_2

tJava_1 échoue (Integer.parseInt("abc")) ; tJava_2 écrit On Component Error. tJava_1 fails (Integer.parseInt("abc")); tJava_2 writes On Component Error.

2026-11-18 14:34:17|GJyxis|GJyxis|GJyxis|3336|DEMO|JOB_DocLB_T9|_OxmYp4ox4mWoM60Q-N18ZB|0.1|Default||begin||
2026-11-18 14:34:17|GJyxis|GJyxis|GJyxis|3336|DEMO|JOB_DocLB_T9|_OxmYp4ox4mWoM60Q-N18ZB|0.1|Default|tJava_1|begin||
Exception in component tJava_1 (JOB_DocLB_T9)
java.lang.NumberFormatException: For input string: "abc"
	…
2026-11-18 14:34:17|GJyxis|GJyxis|GJyxis|3336|DEMO|JOB_DocLB_T9|_OxmYp4ox4mWoM60Q-N18ZB|0.1|Default|tJava_1|end|failure|3
On Component Error
2026-11-18 14:34:17|GJyxis|GJyxis|GJyxis|3336|DEMO|JOB_DocLB_T9|_OxmYp4ox4mWoM60Q-N18ZB|0.1|Default||end|success|24

Le composant est en failure, mais le job, dont l'erreur est traitée par le lien, finit en success avec le code 0. The component is in failure, but the job, whose error is handled by the link, ends in success with code 0.

Un tDie cochéA checked tDie

OnSubjobOk tJava_1 tDie_1

tJava_1 attend 120 ms ; tDie aux réglages par défaut. tJava_1 waits 120 ms; tDie with default settings.

2026-11-18 14:34:14|5lgDhL|5lgDhL|5lgDhL|64952|DEMO|JOB_DocLB_T7|_PMikmpNY2Nr9y36LRYBi0B|0.1|Default||begin||
2026-11-18 14:34:14|5lgDhL|5lgDhL|5lgDhL|64952|DEMO|JOB_DocLB_T7|_PMikmpNY2Nr9y36LRYBi0B|0.1|Default|tJava_1|begin||
2026-11-18 14:34:14|5lgDhL|5lgDhL|5lgDhL|64952|DEMO|JOB_DocLB_T7|_PMikmpNY2Nr9y36LRYBi0B|0.1|Default|tJava_1|end|success|123
2026-11-18 14:34:14|5lgDhL|5lgDhL|5lgDhL|64952|DEMO|JOB_DocLB_T7|_PMikmpNY2Nr9y36LRYBi0B|0.1|Default|tDie_1|begin||
tDie_1JOB_DocLB_T7the end is near
2026-11-18 14:34:14|5lgDhL|5lgDhL|5lgDhL|64952|DEMO|JOB_DocLB_T7|_PMikmpNY2Nr9y36LRYBi0B|0.1|Default||end|failure|148

Le tDie a une ligne begin mais pas de ligne end : le modèle du job l'exclut. Le job finit en failure, avec le code 4 du tDie. The tDie has a begin row but no end row: the job template leaves it out. The job ends in failure, with code 4 from the tDie.

PiègesPitfalls

Un begin sans endA begin without an end

Un tDie coché n'a jamais de ligne end. Si vous calculez des durées en rapprochant les begin et les end, prévoyez ce cas ; dans l'exemple plus haut, la ligne end du job est bien écrite. A checked tDie never has an end row. If you compute durations by pairing begin and end rows, allow for this case; in the example above, the end row of the job is written.

Vers un fichier : Écrire à la suite deTo a file: Append

Le sous-job du tStatCatcher est exécuté à chaque message : sa sortie est rouverte à chaque fois. Le même montage avec un tAssertCatcher et un tFileOutputDelimited aux réglages par défaut échoue dès le deuxième message : voir tAssertCatcher. The subjob of the tStatCatcher is run at each message: its output is reopened each time. The same setup with a tAssertCatcher and a tFileOutputDelimited with default settings fails from the second message: see tAssertCatcher.

La seconde, pas la millisecondeThe second, not the millisecond

Le modèle de date de moment s'arrête à la seconde : plusieurs lignes portent souvent la même valeur. Pour mesurer, utilisez duration. The date pattern of moment stops at the second: several rows often carry the same value. To measure, use duration.

Pas de nombre de lignesNo row count

Le tStatCatcher ne compte pas les lignes d'un flux. Pour cela, utilisez un tFlowMeter et son tFlowMeterCatcher. The tStatCatcher does not count the rows of a flow. For that, use a tFlowMeter and its tFlowMeterCatcher.

ConseilsTips

Un historique des exécutionsA history of the runs

Sans rien cocher, les deux lignes du job suffisent pour suivre chaque exécution : filtrez message_type égal à "end" avec un tFilterRow et écrivez moment, job, message et duration dans une table. With nothing checked, the two rows of the job are enough to follow each run: filter message_type equal to "end" with a tFilterRow and write moment, job, message and duration to a table.

Cocher peu de composantsCheck few components

Chaque composant coché ajoute deux exécutions du sous-job du tStatCatcher. Cochez les étapes longues (lectures, écritures en base), pas tous les composants. Each checked component adds two runs of the subjob of the tStatCatcher. Check the long steps (reads, database writes), not every component.

Rapprocher les lignesPair the rows

pid est le même sur toutes les lignes d'une exécution, y compris celles d'un tAssertCatcher du même job : c'est la clé pour regrouper les journaux d'une exécution. pid is the same on all the rows of a run, including those of a tAssertCatcher of the same job: it is the key to group the logs of a run.

Mesurer un passage précisMeasure a precise section

Pour chronométrer un morceau de flux plutôt qu'un composant, voyez tChronometerStart et tChronometerStop. To time a section of a flow rather than a component, see tChronometerStart and tChronometerStop.

Voir aussiSee also