Mercurial > hg > orthanc-stone
diff Platforms/Wasm/wasm-application-runner.ts @ 526:548eed46f535 dev
introduced a Logger class that displays timing and source (C++/JS)
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 14 Mar 2019 19:04:35 +0100 |
parents | 7105a0bad250 |
children | 1c5104a6f7e4 79bb0a02d1cc |
line wrap: on
line diff
--- a/Platforms/Wasm/wasm-application-runner.ts Tue Mar 12 18:28:25 2019 +0100 +++ b/Platforms/Wasm/wasm-application-runner.ts Thu Mar 14 19:04:35 2019 +0100 @@ -1,5 +1,6 @@ import Stone = require('./stone-framework-loader'); import StoneViewport = require('./wasm-viewport'); +import * as Logger from './logger' if (!('WebAssembly' in window)) { alert('Sorry, your browser does not support WebAssembly :('); @@ -85,7 +86,7 @@ // the WebAssembly environment) and then, create and initialize the Wasm application Stone.Framework.Initialize(true, function () { - console.log("Connecting C++ methods to JS methods"); + Logger.defaultLogger.debug("Connecting C++ methods to JS methods"); SetStartupParameter = (<any> window).StoneFrameworkModule.cwrap('SetStartupParameter', null, ['string', 'string']); CreateWasmApplication = (<any> window).StoneFrameworkModule.cwrap('CreateWasmApplication', null, ['number']); @@ -103,7 +104,7 @@ SendSerializedMessageToStoneApplication = (<any> window).StoneFrameworkModule.cwrap('SendSerializedMessageToStoneApplication', 'string', ['string']); SendCommandToStoneApplication = (<any> window).StoneFrameworkModule.cwrap('SendCommandToStoneApplication', 'string', ['string']); - console.log("Connecting C++ methods to JS methods - done"); + Logger.defaultLogger.debug("Connecting C++ methods to JS methods - done"); // Prevent scrolling document.body.addEventListener('touchmove', function (event) {