Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Send info from Angular to Java to use LOGGER.info for logging purposes

At first I had hoped to skate by, by using a console.log(); in the ui, but as I suspected, I don’t think our logging, even though the UI is a service, will catch it.

I’m searching, not finding a way to do this, short of possibly an npm library like ngx-logger, but unclear if that will work, or just creating an entire new endpoint for this express purpose, so thought I’d ask first:

I need to send some info from a button click in Angular (9, if it makes a difference) to Java to use it in a LOGGER.info for logging purposes – is there an easy way of doing this, or do I need to create an endpoint, etc..?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You got to create an end point for this.
A RESTful application only interacts with front end via end points only.

By the way, I am also assuming that your application would also be sending API calls to perform action. These actions themselves can print additional informaation like – User X shooped for product Y, so you don’t always have to log via front end.

TLDR: Yes. An end point is required. Though you can buffer them at front end, send it one go.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading