 # For the Renderer Processes
 class DebuggerRenderer extends DebuggerBase
   style = 'background: linear-gradient(30deg, cyan, white 3ex)'
-  constructor: ->
-    @_log = console.debug.bind console, '%c%s', style
+  _getLogFunc: (prefix) ->
+    console.debug.bind console, "%c#{prefix}", style
 
   init: ->
     return Debug.wrap('Already initialised') if @isInitialised()


# For the Browser Process
class DebuggerBrowser extends DebuggerBase
  constructor: ->
    @_log = console.log.bind console, '[DEBUG] %s'.cyan

  init: ->
    return Debug.wrap('Already initialised') if @isInitialised()


# Base Implementation
class DebuggerBase extends IDebugger
  definePureVirtual @prototype, '_getLogFunc', doNothing
  constructor: ->
    @_log = @_getLogFunc '[DEBUG]'

  initialised = false
  isInitialised: ->
    [r ,initialised] = [initialised, true]
