The import log
Every run that gets past the configuration check writes one
tx_ record with
its entries in
tx_. It is what editors see in the backend module
(ThueCat -> Imports) and what a developer reads first when a run behaves unexpectedly.
On this page
Severity
Every entry has a PSR-3 severity, debug to emergency. The run returns the highest severity
it recorded, and the command turns that into its exit code: error or worse fails the command.
See Exit codes.
Choose the severity by what the reader has to do:
error— something that should have been written was not.warning— data was dropped or kept against expectation; a person should look.notice— worth knowing, nothing lost.info— the record of what happened.debug— diagnostics.
The backend module lists errors, or the warnings where there are no errors; warnings next to errors would only bury them. Notices and warnings are additionally shown grouped by type.
Entry types
| Type | Severity | Written when |
|---|---|---|
effective | debug | Once per run, before fetching: the settings in effect. |
saving | info | Per record of the default language written. |
fetching | error | A root could not be fetched. |
mapping | error | A root could not be parsed or resolved. |
data | error | The DataHandler reported an error. |
run | error | The run budget was used up. |
run | error | An unexpected exception ended the run. |
retries | notice | Requests succeeded only after retries, see Recovered retries. |
reference | warning | A reference could not be fetched, see References to other upstream objects. |
reference | info | A reference led to a table its property has no field for. |
category, category | info | Which @type values the category mapping knew. |
category | debug | A category had several possible parents; which one was taken. |
category | warning | No preferred parent fitted. |
category | notice | A type the vocabulary does not know. |
vocabulary, vocabulary | warning | The vocabulary could not be refreshed, or not loaded at all. |
categories | notice | Values for a field the table does not have. |
schedule, schedule | warning | Event schedule days that could not be used. |
event, event | warning | Events that ended up without usable dates. |
event | info | An event matched, or failed to match, a place. |
What the log does not cover:
- A configuration rejected before the run writes no log; the command prints the reason.
- The DataHandler keeps its own logging, so a run also writes to
sys_, for every record it writes. It cannot be switched off: the DataHandler collects its errors only while it logs, and those errors are whatlog datareports.Handler Error
Adding an entry type
An entry is written by a method on
\Werkraum. For the entry
to be visible anywhere, the type has to be registered in all of these places:
- An item in the
typeselect of the TCA oftx_, with its label inthuecat_ import_ log_ entry locallang_.tca. xlf - An entry in the TCA
typesof that table. Without it, the record falls back to another type's fields and hidesmessageandcontext— the fields that carry the content. - A model class below
\Werkraum.Media\ Thue Cat\ Domain\ Model\ Backend\ Import Log Entry - That class in
Configuration/Extbase/Persistence/Classes.php, as a subclass ofImportand with itsLog Entry record. The base class is abstract; without the mapping, the row cannot be loaded at all.Type
The backend module does not list entries generically. It renders accessors on
\Werkraum. Errors, warnings and notices appear
through the existing ones; an info or debug entry needs an accessor and a place in the
template to be shown.