react-server
Advanced tools
Comparing version 0.3.0-beta.2 to 0.3.0-beta.3
{ | ||
"name": "react-server", | ||
"version": "0.3.0-beta.2", | ||
"version": "0.3.0-beta.3", | ||
"description": "React framework with server render for blazing fast page load and seamless transitions between pages in the browser.", | ||
@@ -5,0 +5,0 @@ "main": "target/server/server.js", |
'use strict'; | ||
/* | ||
* Include a logger in your module with: | ||
* | ||
* var logger = require('react-server').logging.getLogger({"name":"react-server.core.logging","color":{"server":159,"client":"rgb(127,212,212)"}}); | ||
* | ||
* This `logger` has methods for each level specified in logging/common.js. | ||
* | ||
* Example: | ||
* | ||
* logger.debug(`result: ${result}`); | ||
* | ||
* Standard log-level methods accept an additional argument, which can be an | ||
* arbitrary data structure. | ||
* | ||
* Example: | ||
* | ||
* try { | ||
* some_work(); | ||
* } catch (err) { | ||
* logger.error("Error calling some_work()", err); | ||
* } | ||
* | ||
* It *also* has a `time` method for timing named metrics. Metric names | ||
* should be dot-separated and be few in number (i.e. don't include object | ||
* IDs or other variables with many potential values). | ||
* | ||
* Example: | ||
* | ||
* logger.time(`result.${http_status_code}`, time_in_ms); | ||
* | ||
* Another way to log timings is with a `timer` object. | ||
* | ||
* Example: | ||
* | ||
* var timer = logger.timer('some_work'); | ||
* | ||
* some_work().then(timer.stop); | ||
* | ||
* It *also* has a `gauge` method for tracking integer values. | ||
* | ||
* Example: | ||
* | ||
* logger.gauge("response_size_in_bytes", size_in_bytes); | ||
* | ||
* If you need more than one logger in your module, you can distinguish them | ||
* with labels: | ||
* | ||
* Example: | ||
* | ||
* var fooLogger = logging.getLogger({"label":"foo","name":"react-server.core.logging.foo","color":{"server":159,"client":"rgb(127,212,212)"}}); | ||
* var barLogger = logging.getLogger({"label":"bar","name":"react-server.core.logging.bar","color":{"server":159,"client":"rgb(127,212,212)"}}); | ||
* | ||
*/ | ||
// See docs/logging | ||
if (false) { | ||
module.exports = require('./logging/server.js'); | ||
module.exports = require('./logging/server.js'); | ||
} else { | ||
module.exports = require('./logging/client.js'); |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xvZ2dpbmdcbmlmIChmYWxzZSkge1xuXHRtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vbG9nZ2luZy9zZXJ2ZXIuanMnKTtcbn0gZWxzZSB7XG5cdG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9sb2dnaW5nL2NsaWVudC5qcycpO1xufVxuIl0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9 |
'use strict'; | ||
/* | ||
* Include a logger in your module with: | ||
* | ||
* var logger = require('react-server').logging.getLogger({"name":"react-server.core.logging","color":{"server":159,"client":"rgb(127,212,212)"}}); | ||
* | ||
* This `logger` has methods for each level specified in logging/common.js. | ||
* | ||
* Example: | ||
* | ||
* logger.debug(`result: ${result}`); | ||
* | ||
* Standard log-level methods accept an additional argument, which can be an | ||
* arbitrary data structure. | ||
* | ||
* Example: | ||
* | ||
* try { | ||
* some_work(); | ||
* } catch (err) { | ||
* logger.error("Error calling some_work()", err); | ||
* } | ||
* | ||
* It *also* has a `time` method for timing named metrics. Metric names | ||
* should be dot-separated and be few in number (i.e. don't include object | ||
* IDs or other variables with many potential values). | ||
* | ||
* Example: | ||
* | ||
* logger.time(`result.${http_status_code}`, time_in_ms); | ||
* | ||
* Another way to log timings is with a `timer` object. | ||
* | ||
* Example: | ||
* | ||
* var timer = logger.timer('some_work'); | ||
* | ||
* some_work().then(timer.stop); | ||
* | ||
* It *also* has a `gauge` method for tracking integer values. | ||
* | ||
* Example: | ||
* | ||
* logger.gauge("response_size_in_bytes", size_in_bytes); | ||
* | ||
* If you need more than one logger in your module, you can distinguish them | ||
* with labels: | ||
* | ||
* Example: | ||
* | ||
* var fooLogger = logging.getLogger({"label":"foo","name":"react-server.core.logging.foo","color":{"server":159,"client":"rgb(127,212,212)"}}); | ||
* var barLogger = logging.getLogger({"label":"bar","name":"react-server.core.logging.bar","color":{"server":159,"client":"rgb(127,212,212)"}}); | ||
* | ||
*/ | ||
// See docs/logging | ||
if (true) { | ||
module.exports = require('./logging/server.js'); | ||
module.exports = require('./logging/server.js'); | ||
} else { | ||
module.exports = require('./logging/client.js'); | ||
module.exports = require('./logging/client.js'); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvZ2dpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQXFEQSxJQUFJLElBQUosRUFBVTtBQUNULFNBQU8sT0FBUCxHQUFpQixRQUFRLHFCQUFSLENBQWpCO0FBQ0EsQ0FGRCxNQUVPO0FBQ04sU0FBTyxPQUFQLEdBQWlCLFFBQVEscUJBQVIsQ0FBakI7QUFDQSIsImZpbGUiOiJsb2dnaW5nLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIEluY2x1ZGUgYSBsb2dnZXIgaW4geW91ciBtb2R1bGUgd2l0aDpcbiAqXG4gKiAgIHZhciBsb2dnZXIgPSByZXF1aXJlKCdyZWFjdC1zZXJ2ZXInKS5sb2dnaW5nLmdldExvZ2dlcih7XCJuYW1lXCI6XCJyZWFjdC1zZXJ2ZXIuY29yZS5sb2dnaW5nXCIsXCJjb2xvclwiOntcInNlcnZlclwiOjE1OSxcImNsaWVudFwiOlwicmdiKDEyNywyMTIsMjEyKVwifX0pO1xuICpcbiAqIFRoaXMgYGxvZ2dlcmAgaGFzIG1ldGhvZHMgZm9yIGVhY2ggbGV2ZWwgc3BlY2lmaWVkIGluIGxvZ2dpbmcvY29tbW9uLmpzLlxuICpcbiAqIEV4YW1wbGU6XG4gKlxuICogICBsb2dnZXIuZGVidWcoYHJlc3VsdDogJHtyZXN1bHR9YCk7XG4gKlxuICogU3RhbmRhcmQgbG9nLWxldmVsIG1ldGhvZHMgYWNjZXB0IGFuIGFkZGl0aW9uYWwgYXJndW1lbnQsIHdoaWNoIGNhbiBi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Z2luZy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFNlZSBkb2NzL2xvZ2dpbmdcbmlmICh0cnVlKSB7XG5cdG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9sb2dnaW5nL3NlcnZlci5qcycpO1xufSBlbHNlIHtcblx0bW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2xvZ2dpbmcvY2xpZW50LmpzJyk7XG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1133873
10070