-
Notifications
You must be signed in to change notification settings - Fork 0
Logging Options and Message Classes
sweiguny edited this page Aug 20, 2014
·
4 revisions
With the options you can configure which message classes shall be logged. By default, all options are set to true.
The following logging options exist:
const OPTION_LOG_PREPARES = "LOG_PREPARES";
const OPTION_LOG_EXECUTES = "LOG_EXECUTES";
const OPTION_LOG_AFFECTIONS = "LOG_AFFECTIONS";
const OPTION_LOG_RETRIEVES = "LOG_RETRIEVES";
const OPTION_LOG_NOTIFICATIONS = "LOG_NOTIFICATIONS";
The following message classes exist:
const MSG_CLASS_PREPARE = "PREPARE";
const MSG_CLASS_EXECUTE = "EXECUTE";
const MSG_CLASS_AFFECTION = "AFFECTION";
const MSG_CLASS_RETRIEVE = "RETRIEVE";
const MSG_CLASS_NOTIFICATION = "NOTIFICATION";
Below you will have a neat explanation of the message classes with examples.
Prepare messages are all messages regarding prepared statements.
Preparing query for class '\PPA\examples\entity\Right': SELECT `right`.* FROM `role2right` JOIN `right` ON (`role2right`.right_id = `right`.id) WHERE `role2right`.role_id = ?
Execute messages are all messages regarding the execution of a statement.
Executing query for single result for class '\PPA\examples\entity\Role': select * from `role` where id=1
Executing query for resultlist with values: Array
(
[0] => 1
)
Affection messages are all messages regarding the result of CRUD-statements.
10 rows affected
Last inserted primary key: 23
Retrieve messages are all messages regarding the result of a select-statement.
Retrieved scalar: 1.25
Retrieved 10 rows
Retrieved one Entity ('\PPA\examples\entity\Role') [id: 1]
Notifications are messages regarding internal tasks. They are additional messages that may help finding out, analyzing and correcting bugs.
MockEntityList exchanges itself with a list of real Entities ('\PPA\examples\entity\Role')