koding / kd

UI Framework for web applications.
MIT License
115 stars 35 forks source link

Enable/disable console output #151

Closed alex-ionochkin closed 8 years ago

alex-ionochkin commented 8 years ago

@sinan, can you please review this fix? The reason why I made these changes is that kd keeps references to console methods and use those references for kd.log, kd.warn, kd.error etc. This logic makes useless any try to overwrite console methods to disable logging - https://github.com/koding/koding/blob/master/client/app/lib/util/disableLogs.coffee#L34 Wrapping console calls with functions helps to solve this problem