       continue unless ext.construct instanceof Function
 
       unless ext.argument?
-        console.log "[compile:#{map.name}] #{key} " + if val instanceof Object then "{ #{Object.keys val} }" else val
+        console.debug? "[compile:#{map.name}] #{key} " + if val instanceof Object then "{ #{Object.keys val} }" else val
         children = @compile val, map
         output[key] = ext.construct.call map, key, val, children, output, ext
         delete output[key] unless output[key]?
       else
         for arg in (extractKeys val)
           params = if val instanceof Object then val[arg]
-          console.log "[compile:#{map.name}] #{key} #{arg} " + if params? then "{ #{Object.keys params} }" else ''
+          console.debug? "[compile:#{map.name}] #{key} #{arg} " + if params? then "{ #{Object.keys params} }" else ''
           params ?= {}
           children = @compile params, map unless key is 'specification'
           try

fs     = require 'fs'
path   = require 'path'

YANG_SPEC_SCHEMA = yaml.Schema.create [

  new yaml.Type '!require',
    kind: 'scalar'
    resolve:   (data) -> typeof data is 'string'
    construct: (data) ->
      console.log "processing !require using: #{data}"
      require data
      #require (path.resolve pkgdir, data)


    kind: 'scalar'
    resolve:   (data) -> typeof data is 'string'
    construct: (data) =>
      console.debug? "processing !yang using: #{data}"
      (new Compiler {}).parse data
]

