[#absl-LogEntry-stacktrace]
= xref:absl.adoc[absl]::xref:absl/LogEntry.adoc[LogEntry]::stacktrace
:relfileprefix: ../../
:mrdocs:

Returns the optional stacktrace, e&period;g&period; for `FATAL` logs and failed `CHECK`s&period;

== Synopsis

Declared in `&lt;absl&sol;log&sol;log&lowbar;entry&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::string&lowbar;view
stacktrace() const;
----

== Description

Fatal entries are dispatched to each sink twice&colon; first with all data and metadata but no stacktrace, and then with the stacktrace&period; This is done because stacktrace collection is sometimes slow and fallible, and it&apos;s critical to log enough information to diagnose the failure even if the stacktrace collection hangs&period;

The buffer does not outlive the entry&semi; if you need the data later, you must copy it&period;

== Return Value

The stacktrace, or an empty string if none was collected&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
