Ionic app debug - maintainig an audit log

I am developing ionic 4 application and in this application, i am maintaining an audit log of accitvities that happens inside the app.
I currently adding the page name and the code line number manually.
Is there a way to get the module/class name and the currently executing line number of an ionic app.??