Skip to content

Commit 2cdeaec

Browse files
Merge pull request #244815 from chriswhilar/patch-75
Update troubleshooting-info.md
2 parents fa844e9 + b9d107b commit 2cdeaec

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/communication-services/concepts/troubleshooting-info.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,22 +162,22 @@ Console.WriteLine($"Email operation id = {emailSendOperation.Id}");
162162
# [JavaScript](#tab/javascript)
163163

164164
The Azure Communication Services Calling SDK relies internally on [@azure/logger](https://www.npmjs.com/package/@azure/logger) library to control logging.
165-
Use the `setLogLevel` method from the `@azure/logger` package to configure the log output:
165+
Use the `setLogLevel` method from the `@azure/logger` package to configure the log output level. Create a logger and pass it into the CallClient constructor:
166166

167167
```javascript
168-
import { setLogLevel } from '@azure/logger';
168+
import { setLogLevel, createClientLogger, AzureLogger } from '@azure/logger';
169169
setLogLevel('verbose');
170-
const callClient = new CallClient();
170+
let logger = createClientLogger('ACS');
171+
const callClient = new CallClient({ logger });
171172
```
172173

173174
You can use AzureLogger to redirect the logging output from Azure SDKs by overriding the `AzureLogger.log` method:
174175
This value may be useful if you want to redirect logs to a location other than console.
175176

176177
```javascript
177-
import { AzureLogger } from '@azure/logger';
178178
// redirect log output
179179
AzureLogger.log = (...args) => {
180-
console.log(...args); // to console, file, buffer, REST API..
180+
console.log(...args); // to console, file, buffer, REST API, etc...
181181
};
182182
```
183183

0 commit comments

Comments
 (0)