File indexing completed on 2025-01-19 04:25:19
0001 /************************************************* 0002 * Debug functions * 0003 * * 0004 * (c) 2008 Peter ZHOU <peterzhoulei@gmail.com> * 0005 **************************************************/ 0006 0007 Debug.initialize = function ( key ) 0008 { 0009 this.debug_prefix = ""; 0010 this.app_name = ""; 0011 } 0012 0013 Debug.app_name = function ( str ) 0014 { 0015 this.app_name = str; 0016 } 0017 0018 Debug.debug = function ( str ) 0019 { 0020 if ( this.debug_prefix != "" ) this.prefix = this.debug_prefix; 0021 else this.prefix = ""; 0022 this.indent = " "; 0023 Amarok.debug( this.app_name + ":" + this.indent + this.prefix + str ); 0024 } 0025 0026 Debug.warning = function ( str ) 0027 { 0028 if ( this.debug_prefix != "" ) this.prefix = this.debug_prefix; 0029 else this.prefix = ""; 0030 this.indent = " "; 0031 Amarok.debug( this.app_name + ":" + this.indent + " WARNING:" + this.prefix + str ); 0032 } 0033 0034 Debug.error = function ( str ) 0035 { 0036 if ( this.debug_prefix != "" ) this.prefix = this.debug_prefix; 0037 else this.prefix = ""; 0038 this.indent = " "; 0039 Amarok.debug( this.app_name + ":" + this.indent + " ERROR:" + this.prefix + str ); 0040 } 0041 0042 Debug.fatal = function ( str ) 0043 { 0044 if ( this.debug_prefix != "" ) this.prefix = this.debug_prefix; 0045 else this.prefix = ""; 0046 this.indent = " "; 0047 Amarok.debug( this.app_name + ":" + this.indent + " FATAL:" + this.prefix + str ); 0048 } 0049 0050