pub struct LogRecord {
pub timestamp: SystemTime,
pub server_id: Option<Arc<str>>,
pub workspace: Option<Arc<Path>>,
pub level: LogLevel,
pub source: LogSource,
pub message: String,
}Expand description
One log entry. Cheap to clone (Arc<str> for server id,
Arc<Path> for workspace; the message is a plain String).
Fields§
§timestamp: SystemTimeWall-clock time of emission. Used for buffer rendering; not load-bearing for ordering (records preserve insertion order in their ring).
server_id: Option<Arc<str>>None for subsystem-wide records (supervisor events).
Pre-B’.2 records may have server_id without workspace;
post-B’.2 the two travel together (both Some => per-instance,
both None => subsystem-wide). Mixed states route to global.
workspace: Option<Arc<Path>>None for subsystem-wide records. The workspace root the
(server_id, workspace) actor was spawned against. Two
rust-analyzer instances on different workspaces stay
distinct via this field.
level: LogLevel§source: LogSource§message: StringTrait Implementations§
Auto Trait Implementations§
impl Freeze for LogRecord
impl RefUnwindSafe for LogRecord
impl Send for LogRecord
impl Sync for LogRecord
impl Unpin for LogRecord
impl UnsafeUnpin for LogRecord
impl UnwindSafe for LogRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more