# system.kanoa.logger.addLog(logInfo, userId)

Adds a new log record. All logInfo keys are required unless otherwsie stated

---
### Parameters
**logInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - assetId</td><td>Integer</td><td>Not required. Will be set to null if omitted.</td></tr>	
 	<tr><td> - logMessage</td><td>String</td><td></td></tr>	
 	<tr><td> - logTypeId</td><td>Integer</td><td>Not required. Will be set to 'info' if omitted.</td></tr>	
 	<tr><td> - loggerId</td><td>Integer</td><td></td></tr>	
	</tbody>
</table>

**userId** `Integer`: Id of user executing the function<br />

---
### Returns
**logId** `Integer`<br />
**message** `String` None if success<br />

---
### Example
```python
logInfo = {
    'loggerId': 4,
    'logMessage': 'Error found while scheduling operation',
    'logTypeId': 3,
    'assetId': 510
}
newLogId, msg = system.kanoa.logger.addLog(logInfo, 5)
```
