Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = exports.ROARR = void 0;
  6. var _boolean = require("boolean");
  7. var _detectNode = _interopRequireDefault(require("detect-node"));
  8. var _globalthis = _interopRequireDefault(require("globalthis"));
  9. var _factories = require("./factories");
  10. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  11. const globalThis = (0, _globalthis.default)();
  12. const ROARR = globalThis.ROARR = (0, _factories.createRoarrInititialGlobalState)(globalThis.ROARR || {});
  13. exports.ROARR = ROARR;
  14. let logFactory = _factories.createLogger;
  15. if (_detectNode.default) {
  16. // eslint-disable-next-line no-process-env
  17. const enabled = (0, _boolean.boolean)(process.env.ROARR_LOG || '');
  18. if (!enabled) {
  19. logFactory = _factories.createMockLogger;
  20. }
  21. }
  22. var _default = logFactory(message => {
  23. if (ROARR.write) {
  24. // Stringify message as soon as it is received to prevent
  25. // properties of the context from being modified by reference.
  26. const body = JSON.stringify(message);
  27. ROARR.write(body);
  28. }
  29. });
  30. exports.default = _default;
  31. //# sourceMappingURL=log.js.map