#758·debug

Add unique ID without impacting wildcard functionality

Author: bramevoCreated May 17, 2020Updated Feb 24, 2025

If a lot of different users interact with your application at the same time and calling async calls, you get log output that is a combination of all these actions and it's not easy to determine which log line is for which user/action/transaction/call_it_however_you_like.

I thought about using the extend function and add something like ":trans(transaction_id)" so the output would be: debug:app(transaction_id) Some log output

But the problem here is that wildcards for enabling other extend calls would be an issue. For example DEBUG=debug:app*:other_extend_call which will not work.

Is there a way to add a transactionid to this without breaking the wildcard functionality? For example by just removing (transaction_id) using a replace somewhere in the library?