'Access Unity Log Stacktrace when highlighting a Log?

When I select any item from the console Log, is there any way to get access to the information is displaying? I'm interested in accessing the information as a string, is it possible?

I mean that piece of information text that appears under the console with information from the selected item. Also would be great if there was an event like ChangedSelection but I'd be fine with just the information below. enter image description here Thank you!



Solution 1:[1]

The console does not have any selection event as far as i'm aware of. If you're interested in the logs however you can get all logs by using the Application.logMessageReceived event. This includes the log message and the stacktrace.

void OnEnable()
{
    Application.logMessageReceived += HandleLog;
}

void OnDisable()
{
    Application.logMessageReceived -= HandleLog;
}

void HandleLog(string logString, string stackTrace, LogType type)
{
    output = logString;
    stack = stackTrace;
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lieke