77 * @flow
88 */
99
10- import type { Lane , Lanes } from './ReactFiberLane' ;
1110import type { Wakeable } from 'shared/ReactTypes' ;
1211
1312import { enableDebugTracing } from 'shared/ReactFeatureFlags' ;
@@ -18,10 +17,6 @@ let nativeConsoleLog: null | Function = null;
1817const pendingGroupArgs : Array < any > = [];
1918let printedGroupIndex: number = -1;
2019
21- function formatLanes(laneOrLanes: Lane | Lanes): string {
22- return '0b' + ( laneOrLanes : any ) . toString ( 2 ) . padStart ( 31 , '0' ) ;
23- }
24-
2520function group(...groupArgs): void {
2621 pendingGroupArgs . push ( groupArgs ) ;
2722
@@ -62,11 +57,11 @@ function log(...logArgs): void {
6257const REACT_LOGO_STYLE =
6358 'background-color: #20232a; color: #61dafb; padding: 0 2px;' ;
6459
65- export function logCommitStarted ( lanes : Lanes ) : void {
60+ export function logCommitStarted ( priorityLabel : string ) : void {
6661 if ( __DEV__ ) {
6762 if ( enableDebugTracing ) {
6863 group (
69- `%c⚛️%c commit%c (${ formatLanes ( lanes ) } )` ,
64+ `%c⚛️%c commit%c (priority: ${ priorityLabel } )` ,
7065 REACT_LOGO_STYLE ,
7166 '' ,
7267 'font-weight: normal;' ,
@@ -133,11 +128,11 @@ export function logComponentSuspended(
133128 }
134129}
135130
136- export function logLayoutEffectsStarted ( lanes : Lanes ) : void {
131+ export function logLayoutEffectsStarted ( priorityLabel : string ) : void {
137132 if ( __DEV__ ) {
138133 if ( enableDebugTracing ) {
139134 group (
140- `%c⚛️%c layout effects%c (${ formatLanes ( lanes ) } )` ,
135+ `%c⚛️%c layout effects%c (priority: ${ priorityLabel } )` ,
141136 REACT_LOGO_STYLE ,
142137 '' ,
143138 'font-weight: normal;' ,
@@ -154,11 +149,11 @@ export function logLayoutEffectsStopped(): void {
154149 }
155150}
156151
157- export function logPassiveEffectsStarted ( lanes : Lanes ) : void {
152+ export function logPassiveEffectsStarted ( priorityLabel : string ) : void {
158153 if ( __DEV__ ) {
159154 if ( enableDebugTracing ) {
160155 group (
161- `%c⚛️%c passive effects%c (${ formatLanes ( lanes ) } )` ,
156+ `%c⚛️%c passive effects%c (priority: ${ priorityLabel } )` ,
162157 REACT_LOGO_STYLE ,
163158 '' ,
164159 'font-weight: normal;' ,
@@ -175,11 +170,11 @@ export function logPassiveEffectsStopped(): void {
175170 }
176171}
177172
178- export function logRenderStarted ( lanes : Lanes ) : void {
173+ export function logRenderStarted ( priorityLabel : string ) : void {
179174 if ( __DEV__ ) {
180175 if ( enableDebugTracing ) {
181176 group (
182- `%c⚛️%c render%c (${ formatLanes ( lanes ) } )` ,
177+ `%c⚛️%c render%c (priority: ${ priorityLabel } )` ,
183178 REACT_LOGO_STYLE ,
184179 '' ,
185180 'font-weight: normal;' ,
@@ -198,12 +193,12 @@ export function logRenderStopped(): void {
198193
199194export function logForceUpdateScheduled (
200195 componentName : string ,
201- lane : Lane ,
196+ priorityLabel : string ,
202197) : void {
203198 if ( __DEV__ ) {
204199 if ( enableDebugTracing ) {
205200 log (
206- `%c⚛️%c ${ componentName } forced update %c(${ formatLanes ( lane ) } )` ,
201+ `%c⚛️%c ${ componentName } forced update %c(priority: ${ priorityLabel } )` ,
207202 REACT_LOGO_STYLE ,
208203 'color: #db2e1f; font-weight: bold;' ,
209204 '' ,
@@ -214,13 +209,13 @@ export function logForceUpdateScheduled(
214209
215210export function logStateUpdateScheduled (
216211 componentName : string ,
217- lane : Lane ,
212+ priorityLabel : string ,
218213 payloadOrAction : any ,
219214) : void {
220215 if ( __DEV__ ) {
221216 if ( enableDebugTracing ) {
222217 log (
223- `%c⚛️%c ${ componentName } updated state %c(${ formatLanes ( lane ) } )` ,
218+ `%c⚛️%c ${ componentName } updated state %c(priority: ${ priorityLabel } )` ,
224219 REACT_LOGO_STYLE ,
225220 'color: #01a252; font-weight: bold;' ,
226221 '' ,
0 commit comments