ComposantsComponents › Logs & ErreursLogs & Errors
Reçoit les messages du job : ceux des tWarn, ceux des tDie et les exceptions Java qui font échouer un composant. Chaque message devient une ligne, au schéma fixe de douze colonnes, que le tLogCatcher envoie à la suite de son sous-job : un affichage, un fichier, une table. Il n'est relié à aucun des composants qu'il écoute : il suffit de le poser dans le job.
Receives the messages of the job: those of the tWarn components, those of the tDie components and the Java exceptions that make a component fail. Each message becomes a row, with a fixed schema of twelve columns, that the tLogCatcher sends to the rest of its subjob: a display, a file, a table. It is not connected to any of the components it listens to: placing it in the job is enough.
EntréeInput
Aucune Il commence toujours son sous-job et n'accepte aucun lien entrant, pas même On Subjob Ok : ce sont les messages qui le lancent. None It always starts its subjob and accepts no incoming link, not even On Subjob Ok: the messages are what start it.
SortieOutput
Un lien Main : une ligne par message. Ou un lien Iterate. One Main link: one row per message. Or one Iterate link.
Déclencheurs en sortieOutput triggers
On Subjob Ok On Component Ok On Component Error Run if
Deux sous-jobs sans lien entre eux. Si un composant du premier échoue, le tLogCatcher écrit une ligne dans le fichier, avec la date, le job, le composant et le message de l'exception. Cochez Ajouter dans le composant de sortie (voir Pièges). Two subjobs with no link between them. If a component of the first one fails, the tLogCatcher writes a row to the file, with the date, the job, the component and the message of the exception. Check Append in the output component (see Pitfalls).
Les tWarn et les tDie du job choisissent le texte, le code et la priorité de leur message ; le tLogCatcher y ajoute la date, le job et le composant d'origine. The tWarn and tDie components of the job choose the text, the code and the priority of their message; the tLogCatcher adds the date, the job and the origin component.
Les libellés sont ceux de l'onglet Composant ; le nom technique, en gris, est celui du paramètre dans le fichier du job. Le composant n'a pas de paramètres avancés propres. Labels are those of the Component tab; the technical name, in grey, is the parameter name in the job file. The component has no advanced settings of its own.
| ParamètreSetting | DéfautDefault | VisibleShown | Description |
|---|---|---|---|
| SchémaSchemaSCHEMA | 12 colonnes12 columns | ToujoursAlways |
Fixe et en lecture seule : voir Le schéma. Pour n'en garder qu'une partie, placez un tFilterColumns ou un tMap après le tLogCatcher.
Fixed and read-only: see The schema. To keep only part of it, put a tFilterColumns or a tMap after the tLogCatcher.
|
| Capturer les exceptions JavaCatch Java ExceptionCATCH_JAVA_EXCEPTION | OuiYes | ToujoursAlways | Reçoit une ligne quand une exception fait échouer un composant du job. Une erreur qu'un composant traite lui-même, case Arrêter en cas d'erreur décochée, n'est pas une exception pour le job : elle n'arrive pas ici. Receives a row when an exception makes a component of the job fail. An error that a component handles by itself, Die on error box unchecked, is not an exception for the job: it does not arrive here. |
| Capturer les tDieCatch tDieCATCH_TDIE | OuiYes | ToujoursAlways | Reçoit le message de chaque tDie du job, juste avant l'arrêt. Décochée, un tDie n'envoie rien, même si les exceptions Java sont captées. Receives the message of each tDie of the job, just before the stop. Unchecked, a tDie sends nothing, even if Java exceptions are caught. |
| Capturer les tWarnCatch tWarnCATCH_TWARN | OuiYes | ToujoursAlways | Reçoit le message de chaque tWarn du job. Receives the message of each tWarn of the job. |
Douze colonnes, toujours les mêmes et dans cet ordre. Les sept premières décrivent l'exécution du job ; les cinq dernières, le message. Les valeurs des trois dernières colonnes du tableau ont été relevées à l'exécution. Twelve columns, always the same and in this order. The first seven describe the run of the job; the last five, the message. The values of the last three columns of the table were read from runs.
| ColonneColumn | Type | Exception JavaJava exception | tDie | tWarn |
|---|---|---|---|---|
| moment | Date "yyyy-MM-dd HH:mm:ss" |
Date et heure où le tLogCatcher traite le message.Date and time when the tLogCatcher processes the message. | ||
| pid | String (20) | Identifiant de cette exécution du job : six caractères tirés au hasard à chaque lancement (Wr9M21). Ce n'est pas le numéro de processus du système.Identifier of this run of the job: six characters drawn at random at each start (Wr9M21). It is not the process number of the system. |
||
| root_pid | String (20) | Le pid du job de départ, quand le job est lancé par une chaîne de tRunJob. Égal à pid pour un job lancé directement.The pid of the starting job, when the job is started by a chain of tRunJob components. Equal to pid for a job started directly. |
||
| father_pid | String (20) | Le pid du job parent, celui du tRunJob. Égal à pid pour un job lancé directement.The pid of the parent job, the one with the tRunJob. Equal to pid for a job started directly. |
||
| project | String (50) | Nom technique du projet (DEMO).Technical name of the project (DEMO). |
||
| job | String (255) | Nom du job, sans sa version.Name of the job, without its version. | ||
| context | String (50) | Environnement de contexte de l'exécution (Default).Context environment of the run (Default). |
||
| priority | Integer (3) | 6 (Fatal), toujours(Fatal), always |
La Priorité du composant : 1 Trace, 2 Debug, 3 Info, 4 Avertissement, 5 Erreur, 6 Fatal.The Priority of the component: 1 Trace, 2 Debug, 3 Info, 4 Warning, 5 Error, 6 Fatal. | |
| type | String (255) | Java Exception |
tDie |
tWarn |
| origin | String (255) | Nom unique du composant en échec (tJava_1).Unique name of the failed component (tJava_1). |
Nom unique du tDie ou du tWarn (tWarn_1).Unique name of the tDie or the tWarn (tWarn_1). |
|
| message | String (255) | La classe de l'exception, : sans espace, puis son message.The class of the exception, : without a space, then its message. |
Le message du composant.The message of the component. | |
| code | Integer (3) | 1, toujours, always |
Le Code d'erreur.The Error code. | Le Code.The Code. |
Le tLogCatcher enregistre l'erreur, il ne la répare pas. Après une exception captée, la pile d'appels est quand même écrite sur la sortie d'erreur et le job se termine en échec, avec le code 1. Ce sont les liens On Component Error et On Subjob Error du composant en échec qui permettent de réagir ; le tLogCatcher reçoit l'exception dans les deux cas. The tLogCatcher records the error, it does not repair it. After a caught exception, the stack trace is still written to the error output and the job ends as failed, with code 1. The On Component Error and On Subjob Error links of the failed component are what allow reacting; the tLogCatcher receives the exception in both cases.
Sorties copiées depuis une exécution des jobs, sortie standard et sortie d'erreur mêlées comme dans la console. Le nom des jobs est remplacé par MyJob et les piles d'appels sont abrégées (…).
Outputs copied from a run of the jobs, standard output and error output mixed as in the console. The job names are replaced with MyJob and the stack traces are shortened (…).
tJava_1 écrit Start puis échoue ; tJava_2 doit écrire After. Le tLogRow est en mode Vertical. Code de tJava_1 :
tJava_1 writes Start then fails; tJava_2 is meant to write After. The tLogRow is in Vertical mode. Code of tJava_1:
System.out.println("Start");
int quantity = Integer.parseInt("abc");
Start Exception in component tJava_1 (MyJob) java.lang.NumberFormatException: For input string: "abc" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) at java.base/java.lang.Integer.parseInt(Integer.java:662) … .----------------------------------------------------------------------. | #1. tLogRow_1 | +------------+---------------------------------------------------------+ | key | value | +------------+---------------------------------------------------------+ | moment | 2026-11-18 14:32:06 | | pid | Wr9M21 | | root_pid | Wr9M21 | | father_pid | Wr9M21 | | project | DEMO | | job | MyJob | | context | Default | | priority | 6 | | type | Java Exception | | origin | tJava_1 | | message | java.lang.NumberFormatException:For input string: "abc" | | code | 1 | +------------+---------------------------------------------------------+
L'exception est écrite, puis le tLogCatcher la reçoit. tJava_2 ne s'exécute pas ; le job se termine avec le code 1. Avec Capturer les exceptions Java décochée, la sortie s'arrête après la pile d'appels. (Dans le cadre, la ligne job est réécrite avec MyJob, complétée par des espaces.)
The exception is written, then the tLogCatcher receives it. tJava_2 does not run; the job ends with code 1. With Catch Java Exception unchecked, the output stops after the stack trace. (In the frame, the job line is rewritten with MyJob, padded with spaces.)
tWarn : "Stock is low", code 7, Avertissement. tDie : "Input file is missing", code 12, Erreur. tLogRow en mode Simple.
tWarn: "Stock is low", code 7, Warning. tDie: "Input file is missing", code 12, Error. tLogRow in Basic mode.
2026-11-18 14:32:09|B07kNn|B07kNn|B07kNn|DEMO|MyJob|Default|4|tWarn|tWarn_1|Stock is low|7 2026-11-18 14:32:09|B07kNn|B07kNn|B07kNn|DEMO|MyJob|Default|5|tDie|tDie_1|Input file is missing|12 Input file is missing
Deux messages, deux exécutions du sous-job. La dernière ligne est celle que le tDie écrit lui-même sur la sortie d'erreur. Le job se termine avec le code 12, celui du tDie. Two messages, two runs of the subjob. The last line is the one the tDie writes by itself to the error output. The job ends with code 12, the one of the tDie.
Ajouter cochée dans le tFileOutputDelimited. Le tJava relit le fichier et l'affiche : Append checked in the tFileOutputDelimited. The tJava reads the file back and prints it:
2026-11-18 14:32:33;LBFFVP;LBFFVP;LBFFVP;DEMO;MyJob;Default;4;tWarn;tWarn_1;First warning;1 2026-11-18 14:32:33;LBFFVP;LBFFVP;LBFFVP;DEMO;MyJob;Default;4;tWarn;tWarn_2;Second warning;2
Une ligne par message. Sans Ajouter, voir le premier des pièges. One row per message. Without Append, see the first of the pitfalls.
tJava_1 échoue comme plus haut ; tJava_2 écrit On Component Error. Le tFilterColumns garde cinq colonnes, le tLogRow est en mode Table.
tJava_1 fails as above; tJava_2 writes On Component Error. The tFilterColumns keeps five columns, the tLogRow is in Table mode.
Exception in component tJava_1 (MyJob) java.lang.NumberFormatException: For input string: "abc" … On Component Error .--------+--------------+-------+-------------------------------------------------------+----. | tLogRow_1 | |=-------+--------------+-------+-------------------------------------------------------+---=| |priority|type |origin |message |code| |=-------+--------------+-------+-------------------------------------------------------+---=| |6 |Java Exception|tJava_1|java.lang.NumberFormatException:For input string: "abc"|1 | '--------+--------------+-------+-------------------------------------------------------+----'
Le sous-job du lien d'erreur s'exécute d'abord, le tLogCatcher ensuite. Ici le job se termine avec le code 0. The subjob of the error link runs first, the tLogCatcher next. Here the job ends with code 0.
Le job de l'exemple « Vers un fichier », Ajouter décochée, le tFileOutputDelimited gardant ses autres réglages par défaut. Le sous-job repart de zéro à chaque message : au deuxième, le fichier existe déjà (chemin abrégé) : The job of the "To a file" example, Append unchecked, the tFileOutputDelimited keeping its other default settings. The subjob starts from scratch for each message: at the second one, the file already exists (shortened path):
tWarn_2 - tWarn failed to log message due to internal error: demo.myjob_0_1.MyJob$TalendException Exception in component tFileOutputDelimited_1 (MyJob) java.lang.RuntimeException: The particular file "…\MyJob.csv" already exist. If you want to overwrite the file, please uncheck the "Throw an error if the file already exist" option in Advanced settings. at demo.myjob_0_1.MyJob.tLogCatcher_1Process(MyJob.java:1967) at demo.myjob_0_1.MyJob.tWarn_2Process(MyJob.java:660) … 2026-11-18 14:32:30;HXEwVd;HXEwVd;HXEwVd;DEMO;MyJob;Default;4;tWarn;tWarn_1;First warning;1
Le second message est perdu : le fichier, relu à la fin, n'a que le premier. Le job continue pourtant et se termine avec le code 1. Avec l'option Throw an error if the file already exist décochée elle aussi, il n'y a plus d'erreur mais chaque message écrase le fichier : il ne reste que le dernier (…tWarn_2;Second warning;2). Dans les deux cas, cochez Ajouter.
The second message is lost: the file, read back at the end, only has the first one. Yet the job goes on and ends with code 1. With the Throw an error if the file already exist option unchecked as well, there is no more error but each message overwrites the file: only the last one remains (…tWarn_2;Second warning;2). In both cases, check Append.
Un tWarn, et un tLogCatcher relié à un tJavaRow qui affiche le message puis lève une exception : A tWarn, and a tLogCatcher connected to a tJavaRow that prints the message then throws an exception:
Catcher got: Stock is low tLogCatcher_1 - tLogCatcher failed to process log message(s) due to internal error: java.lang.RuntimeException: Failure in the catcher subjob java.lang.RuntimeException: Failure in the catcher subjob at demo.myjob_0_1.MyJob.tLogCatcher_1Process(MyJob.java:1623) at demo.myjob_0_1.MyJob.tWarn_1Process(MyJob.java:421) …
L'erreur est écrite sur la sortie d'erreur, mais le job continue et se termine avec le code 0 : un journal qui ne s'écrit plus ne fait pas échouer le job. Surveillez la sortie d'erreur, ou vérifiez le journal lui-même. The error is written to the error output, but the job goes on and ends with code 0: a log that is no longer written does not make the job fail. Watch the error output, or check the log itself.
Un tFileInputDelimited sur un fichier absent, Arrêter en cas d'erreur décochée (son défaut) : le composant écrit lui-même l'erreur, le job continue, sort avec le code 0, et le tLogCatcher ne reçoit rien. Case cochée, il reçoit java.io.FileNotFoundException:C:\data\missing.csv (…), d'origine tFileInputDelimited_1.
A tFileInputDelimited on a missing file, Die on error unchecked (its default): the component writes the error by itself, the job goes on, exits with code 0, and the tLogCatcher receives nothing. With the box checked, it receives java.io.FileNotFoundException:C:\data\missing.csv (…), with origin tFileInputDelimited_1.
La colonne message est déclarée sur 255 caractères, mais un message de 300 caractères arrive entier. Vers une table, prévoyez une colonne assez large, ou coupez le message dans un tMap : sinon c'est l'écriture du journal qui échoue.
The message column is declared with 255 characters, but a message of 300 characters arrives whole. To a table, plan a wide enough column, or cut the message in a tMap: otherwise writing the log is what fails.
Le tLogCatcher n'écoute que son job. Un job enfant arrêté par un tDie : c'est le tLogCatcher de l'enfant qui reçoit le tDie. Celui du parent ne reçoit que l'échec du tRunJob : type Java Exception, origine tRunJob_1, message java.lang.RuntimeException:Child job running failed. suivi d'un retour à la ligne.
The tLogCatcher only listens to its own job. A child job stopped by a tDie: the tLogCatcher of the child is the one that receives the tDie. The one of the parent only receives the failure of the tRunJob: type Java Exception, origin tRunJob_1, message java.lang.RuntimeException:Child job running failed. followed by a line break.
Un tWarn dans un flux de 10 000 lignes exécute 10 000 fois le sous-job du tLogCatcher, pendant que le flux attend. Gardez ce sous-job court, et évitez d'y ouvrir une connexion à chaque fois : utilisez une connexion partagée, ouverte avant. A tWarn in a flow of 10,000 rows runs the subjob of the tLogCatcher 10,000 times, while the flow waits. Keep that subjob short, and avoid opening a connection each time: use a shared connection, opened beforehand.
Un tFilterRow après le tLogCatcher sépare les messages : priority supérieure ou égale à 5 vers un fichier d'erreurs ou une alerte, le reste vers le journal courant. Les exceptions Java arrivent toujours avec 6.
A tFilterRow after the tLogCatcher splits the messages: priority greater than or equal to 5 to an error file or an alert, the rest to the regular log. Java exceptions always arrive with 6.
Écrits dans une même table par tous les jobs, pid, father_pid et root_pid retrouvent les messages d'une exécution et ceux des jobs enfants qu'elle a lancés. Les mêmes colonnes se retrouvent dans le tStatCatcher et le tFlowMeterCatcher.
Written to the same table by every job, pid, father_pid and root_pid find the messages of one run and those of the child jobs it started. The same columns are found in the tStatCatcher and the tFlowMeterCatcher.
tWarn · envoyer un message sans arrêter le jobsend a message without stopping the jobtDie · envoyer un message et arrêter le jobsend a message and stop the jobtLogRow · afficher les messages dans la consoledisplay the messages in the consoletFileOutputDelimited · les écrire dans un fichier, avec Ajouterwrite them to a file, with AppendtStatCatcher · début, fin et durée des composantsstart, end and duration of the componentstAssertCatcher · les résultats des tAssertthe results of the tAssert components