ccampbell / chromephp

class for logging PHP variables to Google Chrome console
http://www.chromelogger.com
1.38k stars 450 forks source link

.info method in ChromePhp server-library #3

Closed qfox closed 13 years ago

qfox commented 13 years ago

chrome and firebug supports that method, and compatibility needs it). In webkit inspector console it draws log row now, but they can be different methods in future.

Also, I recommend you to change slightly logcleandata method in js-class. Like this or someth:

switch(type) {
  //...
  default:
    type = 'log';
  case 'info':
  case 'log':
  case 'warn':
  case 'error':
    if (show_label) {
      console[type](label, log);
      break;
    }
    console[type](log);
    break;
}

Feel the power of JS ;-)