UNPKG

incubed

Version:

Typescript-version of the incubed client

44 lines 1.77 kB
"use strict"; /*********************************************************** * This file is part of the Slock.it IoT Layer. * * The Slock.it IoT Layer contains: * * - USN (Universal Sharing Network) * * - INCUBED (Trustless INcentivized remote Node Network) * ************************************************************ * Copyright (C) 2016 - 2018 Slock.it GmbH * * All Rights Reserved. * ************************************************************ * You may use, distribute and modify this code under the * * terms of the license contract you have concluded with * * Slock.it GmbH. * * For information about liability, maintenance etc. also * * refer to the contract concluded with Slock.it GmbH. * ************************************************************ * For more information, please refer to https://slock.it * * For questions, please contact info@slock.it * ***********************************************************/ Object.defineProperty(exports, "__esModule", { value: true }); const messages = []; function getLogsAndClear() { const copy = [...messages]; messages.length = 0; return copy; } exports.getLogsAndClear = getLogsAndClear; function log(level, message, ...data) { messages.push({ level, message, data }); } exports.log = log; function info(message, ...data) { log('info', message, ...data); } exports.info = info; function debug(message, ...data) { log('debug', message, ...data); } exports.debug = debug; function error(message, ...data) { log('error', message, ...data); } exports.error = error; //# sourceMappingURL=memoryLogger.js.map