MCPcopy Create free account
hub / github.com/plotly/dash / disableLogs

Function disableLogs

dash/deps/react-dom@18.3.1.js:903–936  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

901
902 disabledLog.__reactDisabledLog = true;
903 function disableLogs() {
904 {
905 if (disabledDepth === 0) {
906 /* eslint-disable react-internal/no-production-logging */
907 prevLog = console.log;
908 prevInfo = console.info;
909 prevWarn = console.warn;
910 prevError = console.error;
911 prevGroup = console.group;
912 prevGroupCollapsed = console.groupCollapsed;
913 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
914
915 var props = {
916 configurable: true,
917 enumerable: true,
918 value: disabledLog,
919 writable: true
920 }; // $FlowFixMe Flow thinks console is immutable.
921
922 Object.defineProperties(console, {
923 info: props,
924 log: props,
925 warn: props,
926 error: props,
927 group: props,
928 groupCollapsed: props,
929 groupEnd: props
930 });
931 /* eslint-enable react-internal/no-production-logging */
932 }
933
934 disabledDepth++;
935 }
936 }
937 function reenableLogs() {
938 {
939 disabledDepth--;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…