Added logging froa ll events.
Fixed date() function issue with the incorrect timezone
Work in progress for messaging system.
Making the default logging '2'
committing after a merge