Skip to content

Commit

Permalink
Refactors debug events
Browse files Browse the repository at this point in the history
Summary: Refactors debug events to use Litho QPL instead of MME

Reviewed By: fabiocarballo

Differential Revision: D55190994

fbshipit-source-id: dab2da2008fc44e25f1002e5c1a00c406864dffe
  • Loading branch information
adityasharat authored and facebook-github-bot committed Mar 22, 2024
1 parent 50779ea commit e7856f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import static com.facebook.litho.LithoRenderUnit.getRenderUnit;
import static com.facebook.litho.LithoRenderUnit.isTouchableDisabled;
import static com.facebook.litho.ThreadUtils.assertMainThread;
import static com.facebook.rendercore.debug.DebugEventAttribute.Key;
import static com.facebook.rendercore.debug.DebugEventAttribute.Name;

import android.annotation.SuppressLint;
import android.content.Context;
Expand Down Expand Up @@ -1547,7 +1547,7 @@ private void checkUnsafeViewModification() {
() -> "-1",
LogLevel.DEBUG,
(attribute) -> {
attribute.put(Key, "unsafe-component-host-modification");
attribute.put(Name, "unsafe-component-host-modification");
return Unit.INSTANCE;
});
break;
Expand Down
5 changes: 2 additions & 3 deletions litho-core/src/main/java/com/facebook/litho/EventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.facebook.litho;

import static com.facebook.rendercore.debug.DebugEventAttribute.Key;
import static com.facebook.rendercore.debug.DebugEventAttribute.Name;
import static com.facebook.rendercore.debug.DebugEventAttribute.Source;

Expand Down Expand Up @@ -70,8 +69,8 @@ public EventHandler(
() -> "-1",
LogLevel.DEBUG,
(attribute) -> {
attribute.put(Key, UnboundEventHandler);
attribute.put(Name, CommonUtils.getSectionNameForTracing(event.getClass()));
attribute.put(Name, UnboundEventHandler);
attribute.put("event", CommonUtils.getSectionNameForTracing(event.getClass()));
attribute.put(Source, this.toString());
attribute.put("hasDispatchInfo", info != null);
return Unit.INSTANCE;
Expand Down

0 comments on commit e7856f3

Please sign in to comment.