system/Log/Logger.php
public function determineFile(): array
	{
		// Determine the file and line by finding the first
		// backtrace that is not part of our logging system.
		$trace = debug_backtrace();
		$file  = null;
		$line  = null;

		foreach ($trace as $row)
		{
			if (in_array($row['function'], ['interpolate', 'determineFile', 'log', 'log_message']))
			{
				continue;
			}

			$file = $row['file'] ?? isset($row['object']) ? get_class($row['object']) : 'unknown';
			$line = $row['line'] ?? $row['function'] ?? 'unknown';
			break;
		}

		return [
			$file,
			$line,
		];
	}
public function determineFile(): array
	{
		// Determine the file and line by finding the first
		// backtrace that is not part of our logging system.
		$trace = debug_backtrace();
		$file  = null;
		$line  = null;

		foreach ($trace as $row)
		{
			if (in_array($row['function'], ['interpolate', 'determineFile', 'log', 'log_message']))
			{
				continue;
			}

			$file = $row['file'] ?? isset($row['object']) ? get_class($row['object']) : 'unknown';
			$line = $row['line'] ?? $row['function'] ?? 'unknown';
			break;
		}

		return [
			$file,
			$line,
		];
	}
Determines the current file/line that the log method was called from.
by analyzing the backtrace.

@return array