Last active
December 16, 2015 00:29
-
-
Save kressaty/5348211 to your computer and use it in GitHub Desktop.
Codeigniter helper function utilizing Chrome PHP log feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// You must include the PHP file from here for this to work: https://github.com/ccampbell/chromephp | |
// In Codeigniter, simply save the PHP file in the "Libraries" directory | |
function consolelog($stuff) | |
{ | |
if(ENVIRONMENT == 'production') | |
{ | |
return; | |
} | |
include_once APPPATH.'libraries/ChromePhp.php'; | |
ChromePhp::log($stuff); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment