comunica / jQuery-Widget.js

🖼 A jQuery widget to query heterogeneous interfaces using Comunica SPARQL
http://query.linkeddatafragments.org/
MIT License
19 stars 34 forks source link

Does changing log level affect the execution log in front end #146

Open AronBuzogany opened 1 year ago

AronBuzogany commented 1 year ago

Currently in the source code the logger is set to info level.

I tried to adjust this by changing it to e.g. trace, logging the context before querying confirms that the logger is indeed changed to trace, but the outcome remains the same (in the execution log) and I do not get logs in console while in dev npm run dev or by building a static version and hosting it with http-server.

I am trying to achieve this because when encountering an UnauthorizedHttpError no results get shown not even those for which I was authorized. When using lenient mode to prevent this, the fact that I am unautherized doesn't get logged anymore.

rubensworks commented 1 year ago

I do not get logs in console

What console do you refer to? The browser console? Or the execution log on the page? (this is where logs should be printed to)

I am trying to achieve this because when encountering an UnauthorizedHttpError no results get shown not even those for which I was authorized. When using lenient mode to prevent this, the fact that I am unautherized doesn't get logged anymore.

What happens when you try this on the command-line (or a JS app)?

AronBuzogany commented 1 year ago

The browser console? Or the execution log on the page? (this is where logs should be printed to)

Both, I checked browser console, "server" console and the execution log. Other errors such as Network Errors or 404 get displayed in the execution log correctly. From what I've tried it's only UnauthorizedHttpError that doesn't get displayed on the execution log.

What happens when you try this on the command-line (or a JS app)?

I haven't tried this yet.

rubensworks commented 1 year ago

From what I've tried it's only UnauthorizedHttpError that doesn't get displayed on the execution log.

And where does this error come from exactly? Are you using some kind of auth mechanism? If so, perhaps the error is not being propagated correctly?

AronBuzogany commented 1 year ago

And where does this error come from exactly?

It originates from a SolidPod which I try to querry but for which I am not authorized.

Are you using some kind of auth mechanism?

I am using all basic settings except for lenient mode.

rubensworks commented 1 year ago

Could be a bug then in the solid auth logic, where it doesn't propagate errors.

AronBuzogany commented 1 year ago

Oh okay, I will look into this. Thanks for your help!