kastiglione accepted this revision.
kastiglione added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lldb/source/Utility/Broadcaster.cpp:211-215
+ Log *log = GetLog(LLDBLog::Events);
+ if (!log && event_sp->GetData())
+ log = event_sp->GetData()->GetLogChannel();
+
+ if (log) {
----------------
jingham wrote:
> kastiglione wrote:
> > should this log to both channels? I find it slightly unexpected that an
> > event wouldn't be printed to the events channel.
> If the events log category is on, then you will get a non-null log and log to
> the events Log. You only get another log if Events is off. And if the event
> data returns a Log in the lldb channel it won't matter anyway, in that case
> this is just a fancy way of doing LogIfAnyCategory...
>
> The only slight oddity here is that if an EventData chose to provide a Log
> not in the lldb channel (e.g. the gdb-remote channel), then if you did:
>
> log enable -f /tmp/remote-log.txt gdb-remote packets
>
> the events would go to the remote-log.txt, but then if you did:
>
> log enable lldb event
>
> the event traces would stop going to that log file.
>
> Since the main point of this change is to be able to log X-type events when
> the X log channel/category is on, but the Events log is NOT on, I don't think
> that's a real problem.
thanks for correcting my misunderstanding
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120917/new/
https://reviews.llvm.org/D120917
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits