react-relay
Version:
A framework for building GraphQL-driven React applications.
26 lines (21 loc) • 541 B
Flow
/**
* 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.
*
* @flow strict-local
* @format
* @oncall relay
*/
;
type LogEvent = (eventData: string) => void;
let loggerImpl = (eventData: string) => {};
module.exports = {
setLoggerImplementation(loggerFn: LogEvent): void {
loggerImpl = loggerFn;
},
logEvent: (eventData: string): void => {
return loggerImpl(eventData);
},
};