With a Silverstripe site, how do I log within a namespace or within a class under the vendor folder?
e.g. SS_Log::log(print_r($variable, true), SS_Log::NOTICE);
Have tried using a backslash \SS_Log::log(print_r($variable, true), \SS_Log::NOTICE);
Logging works fine outside a namespaced class/vendor folder, so this is not a config setting issue.
Do I need a use
statement? Any advice please?
Update
Thank you for your comments. You are right \SS_Log::log(print_r($variable, true), \SS_Log::NOTICE);
works within a namespace in the vendor folder. My mistake, I wasn't calling the correct function; hence the lack of logs appearing.