# JS Logging API

## JS API guide for logging

This file provides methods to write logging traces.

## Logger Object

The `logger` object is the main object for logging functions.

### logger.trace(...msg)

Creates TRACE level logging messages. It concatenates msg parameters to compound message to be logged.

**Kind**: global function  
**Returns**: Void

| Param  | Type             | Description                                                                                                          |
| ------ | ---------------- | -------------------------------------------------------------------------------------------------------------------- |
| ...msg | any | The function takes as parameters a list of elements to be concatenated to generate the string message to be printed. |

Example of use:
```javascript
logger.trace('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);
```


### logger.debug(...msg)

Creates DEBUG level logging messages. It concatenates msg parameters to compound message to be logged.

**Kind**: global function  
**Returns**: Void

| Param  | Type             | Description                                                                                                          |
| ------ | ---------------- | -------------------------------------------------------------------------------------------------------------------- |
| ...msg | any | The function takes as parameters a list of elements to be concatenated to generate the string message to be printed. |

Example of use:
```javascript
logger.debug('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);
```

### logger.info(...msg)

Creates INFO level logging messages. It concatenates msg parameters to compound message to be logged.


**Kind**: global function  
**Returns**: Void

| Param  | Type             | Description                                                                                                          |
| ------ | ---------------- | -------------------------------------------------------------------------------------------------------------------- |
| ...msg | any | The function takes as parameters a list of elements to be concatenated to generate the string message to be printed. |

Example of use:
```javascript
logger.info('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);
```

### logger.warn(...msg)

Creates WARN level logging messages. It concatenates msg parameters to compound message to be logged.


**Kind**: global function  
**Returns**: Void

| Param  | Type             | Description                                                                                                          |
| ------ | ---------------- | -------------------------------------------------------------------------------------------------------------------- |
| ...msg | any | The function takes as parameters a list of elements to be concatenated to generate the string message to be printed. |

Example of use:
```javascript
logger.warn('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);
```

### logger.error(...msg)

Creates ERROR level logging messages. It concatenates msg parameters to compound message to be logged.


**Kind**: global function  
**Returns**: Void

| Param  | Type             | Description                                                                                                          |
| ------ | ---------------- | -------------------------------------------------------------------------------------------------------------------- |
| ...msg | any | The function takes as parameters a list of elements to be concatenated to generate the string message to be printed. |

Example of use:
```javascript
logger.error('Error connecting to host ', host_var, ' and port ', port_var, '. Stop processing');
```