New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New logging implementation #703
New logging implementation #703
Conversation
Codecov Report
@@ Coverage Diff @@
## master #703 +/- ##
==========================================
+ Coverage 91.97% 93.94% +1.97%
==========================================
Files 7 7
Lines 486 446 -40
Branches 91 43 -48
==========================================
- Hits 447 419 -28
- Misses 22 25 +3
+ Partials 17 2 -15
Continue to review full report at Codecov.
|
@@ -307,10 +307,31 @@ not log anything as long as nothing goes wrong. | |||
You can adjust the log level by setting the `logLevel` option to any of the values found in the `LogLevel` top-level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we list out the options here?
@@ -426,8 +426,31 @@ not log anything as long as nothing goes wrong. | |||
You can adjust the log level by setting the `logLevel` option to any of the values found in the `LogLevel` top-level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above comment
docs/_pages/web_client.md
Outdated
| `error()` | `...msgs: any[]` | `void` | | ||
|
||
|
||
**NOTE**: The option can also take a function with the following signature, but this usage is deprecated: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested edit: "While the use of logging functions is deprecated, the logger
option will still currently accept a function if the method signature matches fn(level: string, message: string)
."
The main thing I want to change is for the deprecation part to be at the beginning of the note.
i'm going to override this failure because the lines that are not hit are lines that will be likely removed in v5 (they are in the compatibility layer for logging functions). |
Summary
Implements
ConsoleLogger
, which allows us to removeloglevel
dependency.Refactors objects to use the new
ConsoleLogger
.Refines the
Logger
interface.Accept
Logger
objects for thelogger
option onWebClient
,RTMClient
, andKeepAlive
.Adjusts documentation for deprecation of
LoggingFunc
Fixes #692
Requirements (place an
x
in each[ ]
)