Skip to content

Commit 594e733

Browse files
Add console dot info, warn and error documentation
Updating documentation for console.info, console.warn and console.error
1 parent cf92246 commit 594e733

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

articles/stream-analytics/stream-analytics-javascript-user-defined-functions.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,27 @@ Samstag, 28. Dezember 2019
211211
```
212212

213213
## User Logging
214-
The logging mechanism allows you to capture custom information while a job is running. You can use log data to debug or assess the correctness of the custom code in real time. This mechanism is available through the Console.Log() method.
214+
The logging mechanism allow users to capture custom information while a job is running. Log data can be used to debug or assess the correctness of the custom code in real time. This mechanism is available through 3 different methods.
215+
216+
### Console.Info()
217+
Console.Info method is used to log general information during code execution. This method will log data without interrupting computation. The message logged will be marked as Event Level Informational.
218+
219+
```javascript
220+
console.info('my info message');
221+
```
222+
223+
### Console.Warn()
224+
Console.Warn method is used to log data that may not be correct or expected but are still accepted for computation. This method will not interrupt computation and will resume running after method is return. The message logged will be marked as Event Level Warning.
225+
226+
```javascript
227+
console.warn('my warning message');
228+
```
229+
230+
### Console.Error() and Console.Log()
231+
Console.Error method is only used to log error case where code cannot continue to run. This method will throw exception with the error information provided as input parameter and job will stop running. The error message logged will be marked as Event Level Error.
215232

216233
```javascript
217-
console.log('my error message');
234+
console.error('my error message');
218235
```
219236

220237
You can access log messages through the [diagnostic logs](data-errors.md).

0 commit comments

Comments
 (0)