HI every one in odoo-7 development, i can see print statement output in console. How can i run odoo-8 server to see print output in console?. If not can any one suggest me a funciont like _logger.exception() in odoo-7 to debug my code in odoo-8, while developing module?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Účtovníctvo
- Sklady
- PoS
- Project
- MRP
This question has been flagged
Hi, This will work depends on your log level in your configuration file.
import logging
_logger = logging.getLogger(__name__)
_logger.error('msg')
_logger.warning('msg')
_logger.debug('msg')
_logger.info('msg')
_logger.exception('Connection to the database failed''msg')
Log parameters for configuration file:
# file where the server log will be stored
logfile = None
# specify the level of the logging. Accepted values: info, debug_rpc, warn, test, critical, debug_sql, error, debug, debug_rpc_answer, notset
log_level = info
log_handler = [':INFO']
You can also give these parameters from terminal while starting your sever.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrácia
I think you are simply looking for the --log-level=debug when running your Odoo from terminal? This will print out all the statements in your Ubuntu terminal.
--
Thanks and Regards,
Skype: samba.guduru2(skype)Sambasiva rao,
Simply open up your Ubuntu terminal and navigate to odoo/odoo-server (or however you named the structure). Then start your server with ./openerp-server --log-level=debug
--
Thanks and Regards,
Skype: samba.guduru2(skype)Sambasiva rao,
If you start odoo using init.d boot script, it will start as daemon process. There will be no console to print. Everything will be printed in log file specified in your configuration. Start your server like @Yenthe said, ./openerp-server --log-level=debug (Only for development purpose). You will get the message in print statement. You can also use import pdb;pdb.set_trace() in your module to debug it instead of usual print statement.