Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
logging::LogSourceLocation Struct Reference

Optional source location captured for a structured log entry. More...

#include <src/logging/logger.h>

Public Member Functions

bool valid () const
 Return whether this source-location payload contains usable data.
 

Static Public Member Functions

static constexpr LogSourceLocation current (const char *currentFile=nullptr, int currentLine=0) noexcept
 Capture the current call-site source location when the compiler supports it.
 

Public Attributes

const char * file = nullptr
 Translation-unit file path where the entry originated.
 
int line = 0
 One-based source line number where the entry originated.
 

Detailed Description

Optional source location captured for a structured log entry.

Member Function Documentation

◆ current()

static constexpr LogSourceLocation logging::LogSourceLocation::current ( const char * currentFile = nullptr,
int currentLine = 0 )
inlinestaticnodiscardconstexprnoexcept

Capture the current call-site source location when the compiler supports it.

Parameters
currentFileSource file reported by the compiler builtin.
currentLineSource line reported by the compiler builtin.
Returns
A source-location payload for the current call site.

◆ valid()

bool logging::LogSourceLocation::valid ( ) const
inlinenodiscard

Return whether this source-location payload contains usable data.

Returns
true when both the file path and line number are valid.

The documentation for this struct was generated from the following file: