Mercurial > code > home > repos > light9
changeset 1901:7fe81130b735
move web logging to https://github.com/visionmedia/debug/ so it can have channels that can be turned off
Ignore-this: bc5147fdfe1e4712d671cfc36698a6f
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Sat, 01 Jun 2019 01:11:58 +0000 |
parents | 84b5aab10e47 |
children | 101bcb57b80f |
files | light9/web/edit-choice.coffee light9/web/graph.coffee light9/web/lib/bower.json light9/web/light9-music.coffee light9/web/live/elements.html light9/web/live/live.coffee light9/web/paint/paint-elements.coffee light9/web/rdfdbclient.coffee light9/web/timeline/adjustable.coffee light9/web/timeline/adjusters.coffee light9/web/timeline/brick_layout.coffee light9/web/timeline/inline-attrs.coffee light9/web/timeline/light9-timeline-audio.html light9/web/timeline/timeline-elements.html light9/web/timeline/timeline.coffee light9/web/timeline2/index.html makefile package.json |
diffstat | 18 files changed, 40 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/web/edit-choice.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/edit-choice.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,3 +1,4 @@ +log = debug('editchoice') RDFS = 'http://www.w3.org/2000/01/rdf-schema#' @@ -37,7 +38,7 @@ try onDrop(uri, pos) catch e - console.log(e) + log(e) unhighlight()
--- a/light9/web/graph.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/graph.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,4 +1,4 @@ -log = console.log +log = debug('graph') # Patch is {addQuads: <quads>, delQuads: <quads>} # <quads> are made with Quad(s,p,o,g) @@ -54,7 +54,7 @@ # patterns). Top node is not a handler. @handlers = new Handler(null) @handlerStack = [@handlers] # currently running - + runHandler: (func, label) -> # what if we have this func already? duplicate is safe? @@ -67,9 +67,9 @@ # ohno, something depends on some handlers getting run twice :( if matchingLabel < 2 tailChildren.push(h) - console.time("handler #{label}") + #console.time("handler #{label}") @_rerunHandler(h, null) - console.timeEnd("handler #{label}") + #console.timeEnd("handler #{label}") #@_logHandlerTree() _rerunHandler: (handler, patch) ->
--- a/light9/web/lib/bower.json Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/lib/bower.json Sat Jun 01 01:11:58 2019 +0000 @@ -30,7 +30,8 @@ "iron-flex-layout": "PolymerElements/iron-flex-layout#^2.0.3", "iron-component-page": "PolymerElements/iron-component-page#^3.0.1", "paper-header-panel": "PolymerElements/paper-header-panel#^2.1.0", - "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^2.3.4" + "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^2.3.4", + "debug": "https://github.com/visionmedia/debug/archive/master.zip" }, "resolutions": { "webcomponentsjs": "^v1.1.0",
--- a/light9/web/light9-music.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/light9-music.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,4 +1,5 @@ -log = console.log +log = debug('music') +debug.enable('music') # port of light9/curvecalc/musicaccess.py coffeeElementSetup(class Music extends Polymer.Element
--- a/light9/web/live/elements.html Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/live/elements.html Sat Jun 01 01:11:58 2019 +0000 @@ -1,3 +1,7 @@ +<script src="/lib/debug/debug-build.js"></script> +<script> + debug.enable('*'); +</script> <link rel="import" href="/lib/polymer/polymer.html"> <link rel="import" href="/lib/paper-slider/paper-slider.html"> @@ -262,6 +266,7 @@ <script src="/node_modules/n3/n3-browser.js"></script> <script src="/lib/async/dist/async.js"></script> <script src="/lib/underscore/underscore-min.js"></script> + <script src="../coffee_element.js"></script> <!-- see live.coffee <script src="/lib/jquery/dist/jquery.js"></script>
--- a/light9/web/live/live.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/live/live.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,4 +1,5 @@ -log = console.log +log = debug('live') +debug.enable('live') # Like element.set(path, newArray), but minimizes splices. # Dotted paths don't work yet.
--- a/light9/web/paint/paint-elements.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/paint/paint-elements.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,4 +1,5 @@ -log = console.log +log = debug('paint') +debug.enable('paint') class Painting constructor: (@svg) ->
--- a/light9/web/rdfdbclient.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/rdfdbclient.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,4 +1,4 @@ -log = console.log +log = debug('rdfdbclient') # for mocha if require? @@ -77,7 +77,7 @@ #{ping}ms") sendPatch: (patch) -> - console.log('rdfdbclient: queue patch to server ', patchSizeSummary(patch)) + log('rdfdbclient: queue patch to server ', patchSizeSummary(patch)) @_patchesToSend.push(patch) @_updateStatus() @_continueSending()
--- a/light9/web/timeline/adjustable.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/timeline/adjustable.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,4 +1,5 @@ -log = console.log +log = debug('adjustable') + class Adjustable # Some value you can edit in the UI, probably by dragging
--- a/light9/web/timeline/adjusters.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/timeline/adjusters.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,4 +1,4 @@ -log = console.log +log = debug('adjusters') Drawing = window.Drawing maxDist = 60
--- a/light9/web/timeline/brick_layout.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/timeline/brick_layout.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,3 +1,4 @@ +log = debug('brick') class window.BrickLayout constructor: (@viewState, @numRows) ->
--- a/light9/web/timeline/inline-attrs.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/timeline/inline-attrs.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,4 +1,5 @@ -log = console.log +log = debug('attrs') +debug.enable('*') coffeeElementSetup(class InlineAttrs extends Polymer.Element @is: "light9-timeline-note-inline-attrs"
--- a/light9/web/timeline/light9-timeline-audio.html Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/timeline/light9-timeline-audio.html Sat Jun 01 01:11:58 2019 +0000 @@ -26,7 +26,7 @@ </div> </template> <script> - log = console.log + const log = debug('audio'); Polymer({ is: "light9-timeline-audio", properties: {
--- a/light9/web/timeline/timeline-elements.html Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/timeline/timeline-elements.html Sat Jun 01 01:11:58 2019 +0000 @@ -1,3 +1,7 @@ +<script src="/lib/debug/debug-build.js"></script> +<script> + debug.enable('*'); +</script> <link rel="import" href="/lib/polymer/polymer.html"> <link rel="import" href="/lib/polymer/lib/utils/render-status.html"> <link rel="import" href="/lib/iron-resizable-behavior/iron-resizable-behavior.html">
--- a/light9/web/timeline/timeline.coffee Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/timeline/timeline.coffee Sat Jun 01 01:11:58 2019 +0000 @@ -1,4 +1,6 @@ -log = console.log +log = debug('timeline') +debug.enable('*') + Drawing = window.Drawing ROW_COUNT = 7
--- a/light9/web/timeline2/index.html Fri May 31 22:41:29 2019 +0000 +++ b/light9/web/timeline2/index.html Sat Jun 01 01:11:58 2019 +0000 @@ -24,7 +24,7 @@ </head> <body> <script> - + const log = debug('timeline'); var stage = new PIXI.Container(); var renderer = PIXI.autoDetectRenderer(3000,2000, { @@ -52,7 +52,7 @@ graphics.endFill(); graphics.interactive = true; graphics.on('click', (ev) => { - console.log('hit', ev); + log('hit', ev); }); stage.addChild(graphics);
--- a/makefile Fri May 31 22:41:29 2019 +0000 +++ b/makefile Sat Jun 01 01:11:58 2019 +0000 @@ -32,7 +32,8 @@ npm: npm install - cd node_modules/n3; nodejs ../browserify/bin/cmd.js --standalone N3 --require n3 -o n3-browser.js + (cd node_modules/n3; nodejs ../browserify/bin/cmd.js --standalone N3 --require n3 -o n3-browser.js) + node_modules/browserify/bin/cmd.js light9/web/lib/debug/src/browser.js -o light9/web/lib/debug/debug-build.js --standalone debug bin/ascoltami2: gst_packages link_to_sys_packages
--- a/package.json Fri May 31 22:41:29 2019 +0000 +++ b/package.json Sat Jun 01 01:11:58 2019 +0000 @@ -12,7 +12,7 @@ "@webcomponents/shadycss": "^1.1.3", "@webcomponents/webcomponentsjs": "^1.2.0", "bower": "^1.8.4", - "browserify": "^16.2.0", + "browserify": "^16.2.3", "chai": "^3.5.0", "coffeelint": "^2.1.0", "coffeescript": "^2.3.0",