what names space is Log::add_entry() ?

Permalink
Hi,
I am using 5.7.5.9.
I REALLY need a Log function.

I found some stuff that led me to this line of code:
Log::addEntry("SpaSelector saveValue(" . $data . ")", $logType = null);


But I get the error:
Class 'Concrete\Attribute\SpaSelector\Log' not found

What namespace am I missing?

also, is Log::ad_entry() depricated? Replacement?

Thanks so much,
Sean

 
hutman replied on at Permalink Reply
hutman
You can do this

use Concrete\Core\Logging\GroupLogger;
use Monolog\Logger;
$l = new GroupLogger(LOG_TYPE_EMAILS, Logger::INFO);
$l->write('Log message');
$l->close();
Gondwana replied on at Permalink Best Answer Reply
Gondwana
I know I'm a little late to the party, but I've found this to work:
\Log::addEntry(...)
Logging in 5.7+ needs documenting. :(
SeanDevoy replied on at Permalink Reply
Corrected response:
That is a awesome.
Thanks.

Thanks to mnakalay for correcting me.
mnakalay replied on at Permalink Reply
mnakalay
Actually Gondwana's answer is the most correct and efficient one. You really only need that one line of code and don't forget the backslash so you don't need to use the resource in the first hand.