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

Represents a single entry in a log, i&period;e&period;, one `LOG` statement or failed `CHECK`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class LogEntry final
----

== Description

`LogEntry` is thread&hyphen;compatible&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:absl/LogEntry/tid_t.adoc[`tid&lowbar;t`] 
| Type used to represent a thread ID&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:absl/LogEntry/2constructor.adoc[`LogEntry`]         [.small]#[constructor]# [.small]#[deleted]#
| Deleted&semi; pass `LogEntry` by reference instead, and do not store it as its state does not outlive the call to `LogSink&colon;&colon;Send()`&period;
| xref:absl/LogEntry/operator_assign.adoc[`operator&equals;`]  [.small]#[deleted]#
| Deleted&semi; instances are not copy&hyphen;assignable&period;
| xref:absl/LogEntry/encoded_message.adoc[`encoded&lowbar;message`] 
| Returns a serialized protobuf holding the operands streamed into this log message&period; The message definition is not yet published&period;
| xref:absl/LogEntry/log_severity.adoc[`log&lowbar;severity`] 
| Returns this entry&apos;s severity&period; For `LOG`, taken from the first argument&semi; for `CHECK`, always `absl&colon;&colon;LogSeverity&colon;&colon;kFatal`&period;
| xref:absl/LogEntry/prefix.adoc[`prefix`] 
| Returns true unless the metadata prefix was suppressed once by `LOG(&period;&period;&period;)&period;NoPrefix()` or globally by `absl&colon;&colon;EnableLogPrefix(false)`&period; Implies `text&lowbar;message&lowbar;with&lowbar;prefix() &equals;&equals; text&lowbar;message()`&period;
| xref:absl/LogEntry/source_basename.adoc[`source&lowbar;basename`] 
| Returns the source file base name where the log message occurred&period;
| xref:absl/LogEntry/source_filename.adoc[`source&lowbar;filename`] 
| Returns the source file name where the log message occurred, taken from `*FILE*` unless overridden by `LOG(&period;&period;&period;)&period;AtLocation(&period;&period;&period;)`&period;
| xref:absl/LogEntry/source_line.adoc[`source&lowbar;line`] 
| Returns the source line where the log message occurred, taken from `*LINE*` unless overridden by `LOG(&period;&period;&period;)&period;AtLocation(&period;&period;&period;)`&period;
| xref:absl/LogEntry/stacktrace.adoc[`stacktrace`] 
| Returns the optional stacktrace, e&period;g&period; for `FATAL` logs and failed `CHECK`s&period;
| xref:absl/LogEntry/text_message.adoc[`text&lowbar;message`] 
| Returns the text&hyphen;formatted message without its metadata prefix and without a trailing newline&period;
| xref:absl/LogEntry/text_message_with_newline.adoc[`text&lowbar;message&lowbar;with&lowbar;newline`] 
| Returns the text&hyphen;formatted message without its metadata prefix, with a trailing newline&period;
| xref:absl/LogEntry/text_message_with_prefix.adoc[`text&lowbar;message&lowbar;with&lowbar;prefix`] 
| Returns the text&hyphen;formatted message including its metadata prefix, but without a trailing newline&period;
| xref:absl/LogEntry/text_message_with_prefix_and_newline.adoc[`text&lowbar;message&lowbar;with&lowbar;prefix&lowbar;and&lowbar;newline`] 
| Returns the text&hyphen;formatted message including its metadata prefix and trailing newline&period;
| xref:absl/LogEntry/text_message_with_prefix_and_newline_c_str.adoc[`text&lowbar;message&lowbar;with&lowbar;prefix&lowbar;and&lowbar;newline&lowbar;c&lowbar;str`] 
| Returns a nul&hyphen;terminated C string of the text&hyphen;formatted message including its metadata prefix and trailing newline&period;
| xref:absl/LogEntry/tid.adoc[`tid`] 
| Returns the ID of the thread that wrote this entry&period; Captured during evaluation of `LOG`, but can be overridden by `LOG(&period;&period;&period;)&period;WithThreadID(&period;&period;&period;)`&period;
| xref:absl/LogEntry/timestamp.adoc[`timestamp`] 
| Returns the time at which this entry was written&period; Captured during evaluation of `LOG`, but can be overridden by `LOG(&period;&period;&period;)&period;WithTimestamp(&period;&period;&period;)`&period;
| xref:absl/LogEntry/verbosity.adoc[`verbosity`] 
| Returns this entry&apos;s verbosity, or `kNoVerbosityLevel` for a non&hyphen;verbose entry&period; Taken from the argument to `VLOG` or from `LOG(&period;&period;&period;)&period;WithVerbosity(&period;&period;&period;)`&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:absl/LogEntry/kNoVerboseLevel.adoc[`kNoVerboseLevel`] 
| Deprecated alias for `kNoVerbosityLevel`, to be removed&period;
| xref:absl/LogEntry/kNoVerbosityLevel.adoc[`kNoVerbosityLevel`] 
| For non&hyphen;verbose log entries, `verbosity()` returns `kNoVerbosityLevel`&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:absl/PrintTo.adoc[absl::PrintTo]`
| Writes a human&hyphen;readable representation of `entry` to `os`, e&period;g&period; for use by test frameworks such as GoogleTest&period;
| `absl::log&lowbar;internal::LogMessage`
| 
|===


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