title: What is better way to parse user defined methods or class construct written in logs
body: <p>I have logs which I need to parse and extract values passed to the methods or class construct.</p>
  <p>Eg. Log line like</p>
  <blockquote>
  <p>10-08-2021 08:10:00.345 | 10-08-2021 08:10:00.345 | Debug | test.importA.yada | sometext - <em><strong>[ somefunction(arg1=3,arg2=&quot;odd&quot;),somefunction2(arg1=8,arg2=&quot;even&quot;)]</strong></em>.</p>
  </blockquote>
  <p>From above line I need to extract string list ( bold italic above). And retrieve argument and function name as well. The list could have same or different functions.</p>
  <p>I am able to retrieve string list with regex but to iterate over it as list after changing from string to list, python complains: object not defined or value error. To resolve this I have used exec. BUT want to know if there is more pythonic way to do it.</p>
  <p>Looking for expert opinion. As its quite normal where we log function entry - exit with arguments but how we retrieve it. If you dont have access to those function signatures or modules, practically importing all functions that could pop in logs is not possible.</p>