Comments (10)
As mentioned, I would like to solve it as follows.
Add a link in the main README.md to https://github.com/eclipse/thingweb.node-wot/labels/faq to make it more prominent/visible.
However, I suggest closing the issue because it is not an issue and we avoid going over checking unresolved issues that will never be closed.
However I am fine either way...
from node-wot.
I have to be blamed for the current logging API. I choose the current spec because I had the feeling that at the time the consensus was not to use any library for logging. Here is what the current README is reporting:
We used to have a node-wot-logger package to allow fine-grained logging (by means of Winston). It turned out though that depending on the actual use-case other logging libraries might be better suited. Hence we do not want to prescribe which logging library to use. Having said that, we use console statements which can be easily overridden to use the preferred logging library if needed (see here).
So that's why I used a conservative approach and just define a logging practise
for node-wot. The statement there still feels a little bit cryptic to me, cause I don't really understand the reasons why it was chosen to not use a logging library. @danielpeintner do you remember which were the conflicting use cases, that cannot be covered with something like debug
?
One missing feature that I would like to have is the ability to control debug levels using an env
variable as other libraries do.
from node-wot.
I suggest collecting frequently asked questions instead of keeping issues open.
Any opinion
@egekorkan @sebastiankb @wiresio
We could also link the label from README.md
see https://github.com/eclipse/thingweb.node-wot/labels/FAQ
from node-wot.
I noticed we do have a question label also.
I think we need to decide what to do here
from node-wot.
I would leave it open since it doesn't seem to have an answer if someone were to look at it, coming from an FAQ page.
from node-wot.
I see now, all good by me :)
from node-wot.
Copied from thingweb/node-wot#77
On the way to production, we need to include proper logging. We could use the debug module, which is good for library modules and frameworks (e.g., used by express):
const debug = require('debug')('my-namespace') const name = 'my-app' debug('booting %s', name)
I wanted to revisit this issue as I think that it would be great if we could replace the current console.debug
solution with something like the debug
module as it was mentioned by @mkovatsc. At the moment, all the debug messages create a lot of noise when using node-wot
in an actual application and it would be great if we had some mechanism for enabling or disabling them.
The debug
module allows for this and also adds visual highlighting to distinguish different types of debug messages (e. g. one for each package). However, there might also be alternatives which could be used instead.
from node-wot.
I think it needs better documentation but I guess you can do quite a lot already.
See this example after line
from node-wot.
To be honest I do not really recall all aspects.
I recall that some people wanted to use library X and others library Y. We did not want to force anyone to use X or Y in production, meaning that in the end several logging libraries are needed for an application/system. I guess a plugin logging library like in Java was something what we were looking for.
Having said that, I still think our current way of logging is okay 👍
from node-wot.
resolved by #783
use debug
module for logging
from node-wot.
Related Issues (20)
- Upgrading to ES2021 HOT 2
- allowSelfSigned not working for requestThingDescription HOT 4
- findProtocol SHOULD NOT require base HOT 4
- CI - Add Node.js 22 to CI tests
- CoAP issue on local machine (Windows) - nO HOT 2
- Async actions should not try to validate the value according DataSchema
- action and event affordance do not raise error when data schema does not match HOT 1
- events without subprotocol might be causing unexpected behaviour HOT 3
- Export WoT implementation type
- Modbus Test issue with modv:function HOT 1
- Issue with void-obj of Test Thing HOT 1
- Follow-up on validating output for (async) actions
- Re-creating package-lock.json fails HOT 7
- observe property deserialized value (may) not (be) completely consistent HOT 5
- Deprecating tm-helpers from node-wot HOT 3
- [test] Convert unhandledRejection to uncaughtException
- TODOs after major release
- Re-activate mbus tests on Windows
- two netconf-codec.ts files
- Replacing Protocol and Port Detection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-wot.