Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
guyroch Posted October 19, 2015 Posted October 19, 2015 Is there an IPSDebug equivalent in 4.x? I was not able to find any documentation or working examples. In 3.4 I could use... IPSDebug::addLogMessage('some_message_here', 'some_filename_here', array($some_array1, $some_array2),true); Regards, Guylain
ipsrocks Posted October 19, 2015 Posted October 19, 2015 You could use \IPS\Log \IPS\Log::i( LOG_DEBUG )->write( "My debug message", 'filename' );
guyroch Posted October 19, 2015 Author Posted October 19, 2015 Thanks for the quick reply. However, the main purpose is to help me write a custom license key generator in commerce... and with IPSDebug::addLogMessage I was able to add array($some_array1, $some_array2) which allowed me to figure out the content of some arrays and access their data. Is there such a thing in 4.x. If not how can we get the structure of say \IPS\nexus\Purchase and \IPS\Member objects? EDIT: Where is 'filename' located in 4.x? Thanks again, Guylain
guyroch Posted October 21, 2015 Author Posted October 21, 2015 I'm bumping this. I need either documentation OR a way to output $arrays or $objects in 4.x with \IPS\Log::i( LOG_DEBUG )->write( "My debug message", 'filename' ); as it was possible in 3.4.x IPSDebug::addLogMessage('some_message_here', 'some_filename_here', array($some_array1, $some_array2),true); It is very difficult to write code without knowing the data you have access to. In fact it is almost impossible. ISPDebug in 3.4.x allowed us to output array content and from that we could easily navigate through the array and use the data we needed if our custom code. Thank you
Ryan Ashbrook Posted October 21, 2015 Posted October 21, 2015 \IPS\Log::i( LOG_DEBUG )->write( var_export( array( $array1, $array2 ), TRUE ) );
guyroch Posted January 29, 2016 Author Posted January 29, 2016 Thank you Ryan. Sorry for the late reply.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.