|
|
@ -10,11 +10,13 @@ Here are the several steps to activate the Debug mode when you develop a Odoo mo |
|
|
|
``` |
|
|
|
2. Add the following code in your Python file : |
|
|
|
|
|
|
|
``` |
|
|
|
```python |
|
|
|
import logging #At the beginning of your file |
|
|
|
|
|
|
|
|
|
|
|
_logger = logging.getLogger(__name__) #Before the class where you want to add logs |
|
|
|
|
|
|
|
|
|
|
|
_logger.debug('Create a %s with vals %s', self._name, vals) # To display a DEBUG message |
|
|
|
_logger.info('FYI: This is happening') # To display an INFO message |
|
|
|
_logger.warning('WARNING: I don't think you want this to happen!') # To display a WARNING message |
|
|
|