Skip to content
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

Enable/Disable Logger: SDK logs can be turned on or off from config #301

Merged
merged 5 commits into from
Jun 23, 2023

Conversation

kalyancharlie
Copy link
Contributor

Now users can turn on or off the logger in SDK.

Now users can turn on or off the logger in SDK.
Copy link
Owner

@muke1908 muke1908 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR!
can you also please add it the Readme?
https://github.com/muke1908/chat-e2ee/tree/master/service#usage

Readme updated on how to enable/disable logging for users in sdk
@@ -19,6 +21,11 @@ export class Logger {
}

public log(...args: any[]) {
if(!configContext().settings.disableLog) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to put it in the constructor. This will be evaluated every time the log is called.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks for the suggestion.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@muke1908 muke1908 merged commit 9f02624 into muke1908:master Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants