Feat: Override core logger to add timestamps without microseconds

This commit is contained in:
Björn Fromme
2023-07-06 11:19:48 +02:00
parent 5143427ca4
commit fa79ef8c80
6 changed files with 335 additions and 282 deletions
@@ -97,7 +97,7 @@ class SearchController extends ActionController
if (in_array($remoteIp, $ignoreIps)) { if (in_array($remoteIp, $ignoreIps)) {
return; return;
} }
/** @var $logger \TYPO3\CMS\Core\Log\Logger */
$logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__); $logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
$logger->info('Searchresult processed', [ $logger->info('Searchresult processed', [
'search' => $search->getQuery(), 'search' => $search->getQuery(),
@@ -166,7 +166,7 @@ call_user_func(function() {
$GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpEvents']['Controller']['writerConfiguration'] = [ $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpEvents']['Controller']['writerConfiguration'] = [
\TYPO3\CMS\Core\Log\LogLevel::INFO => [ \TYPO3\CMS\Core\Log\LogLevel::INFO => [
\TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [ \EP\EpProducts\Log\Writer::class => [
'logTable' => 'tx_epevents_log' 'logTable' => 'tx_epevents_log'
], ],
], ],
+291 -279
View File
@@ -1,384 +1,396 @@
# #
# Table structure for table 'tx_epevents_domain_model_traveltype' # Table structure for table 'tx_epevents_domain_model_traveltype'
# #
CREATE TABLE tx_epevents_domain_model_traveltype ( CREATE TABLE tx_epevents_domain_model_traveltype
(
uid int(11) NOT NULL auto_increment, uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL, pid int(11) DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL, title varchar(255) DEFAULT '' NOT NULL,
subtitle varchar(255) DEFAULT '' NOT NULL, subtitle varchar(255) DEFAULT '' NOT NULL,
headertext text NOT NULL, headertext text NOT NULL,
subheadline varchar(255) DEFAULT '' NOT NULL, subheadline varchar(255) DEFAULT '' NOT NULL,
description text NOT NULL, description text NOT NULL,
bannertext text NOT NULL, bannertext text NOT NULL,
buttonlabel varchar(255) DEFAULT '' NOT NULL, buttonlabel varchar(255) DEFAULT '' NOT NULL,
image_header int(11) unsigned NOT NULL default '0', image_header int(11) unsigned NOT NULL default '0',
image_banner int(11) unsigned NOT NULL default '0', image_banner int(11) unsigned NOT NULL default '0',
configurator_type int(11) DEFAULT '0' NOT NULL, configurator_type int(11) DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL, crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL, cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL, starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL, endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL, t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL, t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL, t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL, t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL, t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL, t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL, t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL, t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL, t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL, sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL, l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob, l10n_diffsource mediumblob,
PRIMARY KEY (uid), PRIMARY KEY (uid),
KEY parent (pid), KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid), KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent,sys_language_uid) KEY language (l10n_parent, sys_language_uid)
); );
# #
# Table structure for table 'tx_epevents_domain_model_offer' # Table structure for table 'tx_epevents_domain_model_offer'
# #
CREATE TABLE tx_epevents_domain_model_offer ( CREATE TABLE tx_epevents_domain_model_offer
(
uid int(11) NOT NULL auto_increment, uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL, pid int(11) DEFAULT '0' NOT NULL,
type tinyint(4) unsigned DEFAULT '0' NOT NULL, type tinyint(4) unsigned DEFAULT '0' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL, name varchar(255) DEFAULT '' NOT NULL,
url varchar(255) DEFAULT '' NOT NULL, url varchar(255) DEFAULT '' NOT NULL,
name_internal varchar(255) DEFAULT '' NOT NULL, name_internal varchar(255) DEFAULT '' NOT NULL,
groupname varchar(255) DEFAULT '' NOT NULL, groupname varchar(255) DEFAULT '' NOT NULL,
price int(11) unsigned DEFAULT '0' NOT NULL, price int(11) unsigned DEFAULT '0' NOT NULL,
headline varchar(255) DEFAULT '' NOT NULL, headline varchar(255) DEFAULT '' NOT NULL,
header text NOT NULL, header text NOT NULL,
arrival text NOT NULL, arrival text NOT NULL,
schedule text NOT NULL, schedule text NOT NULL,
services text NOT NULL, services text NOT NULL,
guidelines text NOT NULL, guidelines text NOT NULL,
detail_page varchar(255) DEFAULT '' NOT NULL, detail_page varchar(255) DEFAULT '' NOT NULL,
image_header int(11) unsigned NOT NULL default '0', image_header int(11) unsigned NOT NULL default '0',
image_teaser int(11) unsigned NOT NULL default '0', image_teaser int(11) unsigned NOT NULL default '0',
image_teaser_mobile int(11) unsigned NOT NULL default '0', image_teaser_mobile int(11) unsigned NOT NULL default '0',
booking_form int(11) unsigned NOT NULL default '0', booking_form int(11) unsigned NOT NULL default '0',
configurator_type int(11) DEFAULT '0' NOT NULL, configurator_type int(11) DEFAULT '0' NOT NULL,
configurator_budget int(11) DEFAULT '0' NOT NULL, configurator_budget int(11) DEFAULT '0' NOT NULL,
configurator_pax int(11) DEFAULT '0' NOT NULL, configurator_pax int(11) DEFAULT '0' NOT NULL,
configurator_period int(11) DEFAULT '0' NOT NULL, configurator_period int(11) DEFAULT '0' NOT NULL,
contact int(11) unsigned DEFAULT '0', contact int(11) unsigned DEFAULT '0',
hotel int(11) unsigned DEFAULT '0', hotel int(11) unsigned DEFAULT '0',
location int(11) unsigned DEFAULT '0', location int(11) unsigned DEFAULT '0',
activities int(11) unsigned DEFAULT '0' NOT NULL, activities int(11) unsigned DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL, crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL, cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL, starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL, endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL, t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL, t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL, t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL, t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL, t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL, t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL, t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL, t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL, t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL, sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL, l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob, l10n_diffsource mediumblob,
PRIMARY KEY (uid), PRIMARY KEY (uid),
KEY parent (pid), KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid), KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent,sys_language_uid) KEY language (l10n_parent, sys_language_uid)
); );
# #
# Table structure for table 'tx_epevents_domain_model_location' # Table structure for table 'tx_epevents_domain_model_location'
# #
CREATE TABLE tx_epevents_domain_model_location ( CREATE TABLE tx_epevents_domain_model_location
(
uid int(11) NOT NULL auto_increment, uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL, pid int(11) DEFAULT '0' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL, name varchar(255) DEFAULT '' NOT NULL,
description_short text NOT NULL, description_short text NOT NULL,
description_long text NOT NULL, description_long text NOT NULL,
season text NOT NULL, season text NOT NULL,
image_header int(11) unsigned NOT NULL default '0', image_header int(11) unsigned NOT NULL default '0',
image_teaser int(11) unsigned NOT NULL default '0', image_teaser int(11) unsigned NOT NULL default '0',
image_offer int(11) unsigned NOT NULL default '0', image_offer int(11) unsigned NOT NULL default '0',
configurator_distance tinyint(4) unsigned DEFAULT '0' NOT NULL, configurator_distance tinyint(4) unsigned DEFAULT '0' NOT NULL,
configurator_type tinyint(4) DEFAULT '0' NOT NULL, configurator_type tinyint(4) DEFAULT '0' NOT NULL,
footer_text1 text NOT NULL, footer_text1 text NOT NULL,
footer_text2 text NOT NULL, footer_text2 text NOT NULL,
footer_text3 text NOT NULL, footer_text3 text NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL, crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL, cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL, starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL, endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL, t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL, t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL, t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL, t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL, t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL, t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL, t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL, t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL, t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL, sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL, l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob, l10n_diffsource mediumblob,
PRIMARY KEY (uid), PRIMARY KEY (uid),
KEY parent (pid), KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid), KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent,sys_language_uid) KEY language (l10n_parent, sys_language_uid)
); );
# #
# Table structure for table 'tx_epevents_domain_model_hotel' # Table structure for table 'tx_epevents_domain_model_hotel'
# #
CREATE TABLE tx_epevents_domain_model_hotel ( CREATE TABLE tx_epevents_domain_model_hotel
(
uid int(11) NOT NULL auto_increment, uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL, pid int(11) DEFAULT '0' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL, name varchar(255) DEFAULT '' NOT NULL,
name_internal varchar(255) DEFAULT '' NOT NULL, name_internal varchar(255) DEFAULT '' NOT NULL,
description text NOT NULL, description text NOT NULL,
image_teaser int(11) unsigned NOT NULL default '0', image_teaser int(11) unsigned NOT NULL default '0',
image_offer int(11) unsigned NOT NULL default '0', image_offer int(11) unsigned NOT NULL default '0',
configurator_type int(11) DEFAULT '0' NOT NULL, configurator_type int(11) DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL, crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL, cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL, starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL, endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL, t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL, t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL, t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL, t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL, t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL, t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL, t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL, t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL, t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL, sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL, l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob, l10n_diffsource mediumblob,
PRIMARY KEY (uid), PRIMARY KEY (uid),
KEY parent (pid), KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid), KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent,sys_language_uid) KEY language (l10n_parent, sys_language_uid)
); );
# #
# Table structure for table 'tx_epevents_domain_model_activity' # Table structure for table 'tx_epevents_domain_model_activity'
# #
CREATE TABLE tx_epevents_domain_model_activity ( CREATE TABLE tx_epevents_domain_model_activity
(
uid int(11) NOT NULL auto_increment, uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL, pid int(11) DEFAULT '0' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL, name varchar(255) DEFAULT '' NOT NULL,
name_internal varchar(255) DEFAULT '' NOT NULL, name_internal varchar(255) DEFAULT '' NOT NULL,
path_segment varchar(255) DEFAULT '' NOT NULL, path_segment varchar(255) DEFAULT '' NOT NULL,
keywords text NOT NULL, keywords text NOT NULL,
description text NOT NULL, description text NOT NULL,
footertext text NOT NULL, footertext text NOT NULL,
bannertext text NOT NULL, bannertext text NOT NULL,
image_teaser int(11) unsigned NOT NULL default '0', image_teaser int(11) unsigned NOT NULL default '0',
image_header int(11) unsigned NOT NULL default '0', image_header int(11) unsigned NOT NULL default '0',
image_offer int(11) unsigned NOT NULL default '0', image_offer int(11) unsigned NOT NULL default '0',
configurator_type int(11) DEFAULT '0' NOT NULL, configurator_type int(11) DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL, crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL, cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL, starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL, endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL, t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL, t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL, t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL, t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL, t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL, t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL, t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL, t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL, t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL, sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL, l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob, l10n_diffsource mediumblob,
PRIMARY KEY (uid), PRIMARY KEY (uid),
KEY parent (pid), KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid), KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent,sys_language_uid) KEY language (l10n_parent, sys_language_uid)
); );
# #
# Table structure for table 'tx_epevents_domain_model_contact' # Table structure for table 'tx_epevents_domain_model_contact'
# #
CREATE TABLE tx_epevents_domain_model_contact ( CREATE TABLE tx_epevents_domain_model_contact
(
uid int(11) NOT NULL auto_increment, uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL, pid int(11) DEFAULT '0' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL, name varchar(255) DEFAULT '' NOT NULL,
position varchar(255) DEFAULT '' NOT NULL, position varchar(255) DEFAULT '' NOT NULL,
email varchar(255) DEFAULT '' NOT NULL, email varchar(255) DEFAULT '' NOT NULL,
phone varchar(255) DEFAULT '' NOT NULL, phone varchar(255) DEFAULT '' NOT NULL,
image int(11) unsigned NOT NULL default '0', image int(11) unsigned NOT NULL default '0',
tstamp int(11) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL, crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL, cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL, starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL, endtime int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) DEFAULT '0' NOT NULL, sorting int(11) DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL, t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL, t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL, t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL, t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL, t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL, t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL, t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL, t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL, t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL, sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL, l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob, l10n_diffsource mediumblob,
PRIMARY KEY (uid), PRIMARY KEY (uid),
KEY parent (pid), KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid), KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent,sys_language_uid) KEY language (l10n_parent, sys_language_uid)
); );
# #
# Table structure for table 'tx_epevents_domain_model_testimonial' # Table structure for table 'tx_epevents_domain_model_testimonial'
# #
CREATE TABLE tx_epevents_domain_model_testimonial ( CREATE TABLE tx_epevents_domain_model_testimonial
(
uid int(11) NOT NULL auto_increment, uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL, pid int(11) DEFAULT '0' NOT NULL,
client_name varchar(255) DEFAULT '' NOT NULL, client_name varchar(255) DEFAULT '' NOT NULL,
client_image int(11) unsigned NOT NULL default '0', client_image int(11) unsigned NOT NULL default '0',
quote text NOT NULL, quote text NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL, crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL, cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL, starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL, endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL, t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL, t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL, t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL, t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL, t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL, t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL, t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL, t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL, t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL, sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL, l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob, l10n_diffsource mediumblob,
PRIMARY KEY (uid), PRIMARY KEY (uid),
KEY parent (pid), KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid), KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent,sys_language_uid) KEY language (l10n_parent, sys_language_uid)
); );
# #
# Table structure for table 'tx_epevents_offer_activity_mm' # Table structure for table 'tx_epevents_offer_activity_mm'
# #
CREATE TABLE tx_epevents_offer_activity_mm ( CREATE TABLE tx_epevents_offer_activity_mm
uid_local int(11) unsigned DEFAULT '0' NOT NULL, (
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL, uid_local int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL, uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL, sorting int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
KEY uid_local (uid_local), KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign) KEY uid_foreign (uid_foreign)
); );
# #
# Table structure for table 'pages' # Table structure for table 'pages'
# #
CREATE TABLE pages ( CREATE TABLE pages
tx_epevents_configurator_travel_type tinyint(4) DEFAULT '0', (
tx_epevents_configurator_hotel_type tinyint(4) DEFAULT '0', tx_epevents_configurator_travel_type tinyint(4) DEFAULT '0',
tx_epevents_configurator_destination_type tinyint(4) DEFAULT '0', tx_epevents_configurator_hotel_type tinyint(4) DEFAULT '0',
tx_epevents_configurator_activity_type tinyint(4) DEFAULT '0', tx_epevents_configurator_destination_type tinyint(4) DEFAULT '0',
tx_epevents_traveltype int(11) DEFAULT '0', tx_epevents_configurator_activity_type tinyint(4) DEFAULT '0',
tx_epevents_offer int(11) DEFAULT '0' tx_epevents_traveltype int(11) DEFAULT '0',
tx_epevents_offer int(11) DEFAULT '0'
); );
# #
# Table structure for table 'tt_content' # Table structure for table 'tt_content'
# #
CREATE TABLE tt_content ( CREATE TABLE tt_content
tx_epevents_configurator_travel_type tinyint(4) DEFAULT '0', (
tx_epevents_configurator_travel_type tinyint(4) DEFAULT '0',
); );
# #
# Table structure for table 'tx_epevents_log' # Table structure for table 'tx_epevents_log'
# #
CREATE TABLE tx_epevents_log ( CREATE TABLE tx_epevents_log
request_id varchar(13) DEFAULT '' NOT NULL, (
time_micro double(16,4) NOT NULL default '0.0000', request_id varchar(13) DEFAULT '' NOT NULL,
component varchar(255) DEFAULT '' NOT NULL, time_micro double(16, 4) NOT NULL default '0.0000',
level tinyint(1) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
message text, component varchar(255) DEFAULT '' NOT NULL,
data text, level tinyint(1) unsigned DEFAULT '0' NOT NULL,
message text,
data text,
KEY request (request_id) KEY request (request_id)
); );
@@ -0,0 +1,40 @@
<?php
namespace EP\EpProducts\Log;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Log\LogLevel;
use TYPO3\CMS\Core\Log\LogRecord;
use TYPO3\CMS\Core\Log\Writer\DatabaseWriter;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class Writer extends DatabaseWriter
{
public function writeLog(LogRecord $record)
{
$data = '';
$recordData = $record->getData();
if (!empty($recordData)) {
if (isset($recordData['exception']) && $recordData['exception'] instanceof \Exception) {
$recordData['exception'] = (string)$recordData['exception'];
}
$data = '- ' . json_encode($recordData);
}
$fieldValues = [
'request_id' => $record->getRequestId(),
'time_micro' => $record->getCreated(),
'tstamp' => (int) $record->getCreated(),
'component' => $record->getComponent(),
'level' => LogLevel::normalizeLevel($record->getLevel()),
'message' => $record->getMessage(),
'data' => $data
];
GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable($this->logTable)
->insert($this->logTable, $fieldValues);
return $this;
}
}
@@ -300,7 +300,7 @@ $boot = function () {
$GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [ $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [
\TYPO3\CMS\Core\Log\LogLevel::INFO => [ \TYPO3\CMS\Core\Log\LogLevel::INFO => [
TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [ \EP\EpProducts\Log\Writer::class => [
'logTable' => 'tx_epproducts_log' 'logTable' => 'tx_epproducts_log'
], ],
], ],
@@ -1502,6 +1502,7 @@ CREATE TABLE tx_epproducts_log
( (
request_id varchar(13) DEFAULT '' NOT NULL, request_id varchar(13) DEFAULT '' NOT NULL,
time_micro double(16, 4) NOT NULL default '0.0000', time_micro double(16, 4) NOT NULL default '0.0000',
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
component varchar(255) DEFAULT '' NOT NULL, component varchar(255) DEFAULT '' NOT NULL,
level tinyint(1) unsigned DEFAULT '0' NOT NULL, level tinyint(1) unsigned DEFAULT '0' NOT NULL,
message text, message text,