log.debug( 'this is a debug message' ); log.info( 'this is an info message' ); log.warn( 'this is a warning message' ); log.error( 'this is an error message' ); log.debug( 'this is a debug message' ); log.info( 'this is an info message' ); log.warn( 'this is a warning message' ); log.error( 'this is an error message' );
這個方法的好處是,所有這些公共的方法都能獨立的現實數據。可以很容易的確定發送郵件的類型: 支持下面的瀏覽器: * Internet Explorer 6+ * Firefox 2+ * Safari 2+ * Opera 9.5 另外,如果你使用的是YUI的話,可以考慮YUI中的Logger組件 官方地址 http://www.gscottolson.com/blackbirdjs/