79736495

Date: 2025-08-15 14:04:53
Score: 0.5
Natty:
Report link

So I found out that log offers an optional argument named target for specifying the string which only defaults to the module name of the caller.

I assume that this is done using the builtin module_path macro provided by the compiler. This works for log but I don't think it could work for getting the path for a Location as I would need.

Because now I don't think there is a better solution when not using a macro (what I don't want because of the calling syntax) I will use the file path with line number for this argument.

Feel free to let me know if there is a more elegant solution!

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: h-c