<?php
namespace NeoDuplicateFull\NeoLog; if (!defined("ABSPATH")) { die("neoWP direct access not allowed"); }






function get_caller_log_source() {
    $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);

    foreach ($backtrace as $frame) {
        if (!isset($frame["file"])) { continue; }
        if ($frame["file"] === __FILE__) { continue; }
        if (str_ends_with($frame["file"], "neo-log---init.php") || str_ends_with($frame["file"], "_global--log.php")) { continue; }
        if (str_ends_with($frame["file"], "_global--interface.php"))                                                  { continue; }
        $rel_path = \NeoDuplicateFull\NeoGlobal\make_plugin_file_path_relative($frame["file"]);
        return \NeoDuplicateFull\NeoGlobal\get_module_name($rel_path) !== "neo-global" ? \NeoDuplicateFull\NeoGlobal\get_module_name($rel_path) : pathinfo($frame["file"], PATHINFO_FILENAME);
    }
    return "[Unknown log source]";
}
