Logger: Resource type

Relying on resource conversion to string and searching for # number is not good because even in php.net there is written "naming Resource #999 is subject to change".
Also I got strange situation today where resource couldn't get converted to string and function strstr() throw error that first parameter of strstr() should be string.
Merge pull request #434 from DarkSide666/patch-4

Logger: Resource type