UNPKG

flipper-plugin

Version:

Flipper Desktop plugin SDK and components

25 lines 901 B
"use strict"; /** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ Object.defineProperty(exports, "__esModule", { value: true }); exports.useLogger = exports._LoggerContext = void 0; const react_1 = require("react"); const Logger_1 = require("./Logger"); exports._LoggerContext = (0, react_1.createContext)(Logger_1.stubLogger); /** * Provides the default logger that can be used for console logging, * error reporting and performance measurements. * In internal Facebook builds this is wired up to the internal statistic reporting. * Prefer using `logger` over using `console` directly. */ function useLogger() { return (0, react_1.useContext)(exports._LoggerContext); } exports.useLogger = useLogger; //# sourceMappingURL=useLogger.js.map