js-sdk
js-sdk copied to clipboard
Create New Logging level uitlities
New Logging utilities within packages/misc
will help create granular logging within sdk packages. the current log
, logError
, logWithRequestId
and logErrorWithRequestId
should be renamed to indicate it is logging under debug
, changing the name to logDebug
logDebugWithRequestId
.
The following levels should be implemented.
- Info
- Trace
- Warn
You can find current implementations of logging utilities below: log logWithRequestId
The above implementations use our logger package
see here for how we initialize a instance of our logging:
We should implement explicit logging utilities for the above categories supported in our logging package
- logInfo
- logInfoWithRequestId
- logTrace
- logTraceWithRequestId
- logWarn
- logWarnWithRequestId
@joshLong145 - I can look at this if you want to assign to me
@cipherzzz sure! is now assigned to you. :)
Thanks @joshLong145 - I will get on it!
@joshLong145
Hey! just for clarification, Are you saying that you want the following methods to have versions of each level of logging as a convenience mechanism within packages/misc
?
Current Methods
-
log
-
logError
-
logWithRequestId
-
logErrorWithRequestId
Log Levels
- Debug
- Info
- Trace
- Warn
- Error?
New Methods
Debug
-
logDebug
-
logDebugWithRequestId
console.log()
Info
-
logWarn
-
logWarnWithRequestId
console.info()
Trace
-
logTrace
-
logTraceWithRequestId
console.trace()
Warn
-
logWarn
-
logWarnWithRequestId
console.warn()
Error
-
logError
-
logErrorWithRequestId
console.error()
@cipherzzz
You are correct in your understanding. However we have our own logging package which we should use over console
I updated the description of the issue to link to our logging package and where the misc
package wraps some of the implementations.
This task does not extend to using the new logging utilities. but if you want to try out writing a configuration interface for the logging to replace the debug
flag in our LitNodeClient
Closing due to inactivity