-
Type:
Bug Report
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 5.1.1
-
Fix Version/s: 5.2.0-B1
-
Component/s: Database
-
Labels:
-
External issue URL:
-
Additional information:
-
Change Log Message:Move CURL logs into database
-
Story Points:1
-
External issue ID:950
-
Copy Issue Key:
-
Patch Instructions:
-
BC Break Details:
Curl helper has nice logging feature, that allows to trace all curl requests made over time.
Problem is, that it's not very easy to handle such amount of information, when it is written into a single file. Also when website has large amount of concurrent curl requests, then curl request data is all mixed up together and there is no way to detect what actually happens.
To solve it I propose to log curl requests to database.
Here is table structure, that I've used:
CREATE TABLE IF NOT EXISTS `ptn_CurlLog` (
`LogId` int(11) NOT NULL AUTO_INCREMENT,
`Message` varchar(255) NOT NULL,
`PageUrl` varchar(255) NOT NULL,
`RequestUrl` varchar(255) NOT NULL,
`PortalUserId` int(11) NOT NULL,
`SessionKey` int(11) NOT NULL,
`IsAdmin` tinyint(4) NOT NULL,
`PageData` text,
`RequestData` text,
`ResponseData` text,
`RequestDate` int(11) DEFAULT NULL,
`ResponseDate` int(11) DEFAULT NULL,
`ResponseHttpCode` int(11) NOT NULL,
`CurlError` varchar(255) NOT NULL,
PRIMARY KEY (`LogId`),
KEY `Message` (`Message`),
KEY `PageUrl` (`PageUrl`),
KEY `RequestUrl` (`RequestUrl`),
KEY `PortalUserId` (`PortalUserId`),
KEY `SessionKey` (`SessionKey`),
KEY `IsAdmin` (`IsAdmin`),
KEY `RequestDate` (`RequestDate`),
KEY `ResponseDate` (`ResponseDate`),
KEY `ResponseHttpCode` (`ResponseHttpCode`),
KEY `CurlError` (`CurlError`)
);