This question has been flagged
2 Replies
14435 Views

Hello again,

Actually, when I run this command in my Ubuntu terminal : 

clear; /home/odoo/openerp-server --debug -c /etc/odoo/openerp-server.conf  --database=officielle --db_user=odoo --db_password=jkjkj

All the debugging info is well written in my file /var/log/odoo/odoo-server.log. Good!

But I would want also to have this debuggind info it  the terminal where I run the command... It stays empty! 

An idea?

 

Avatar
Discard
Best Answer

Simply run the Odoo from your terminal and use the command --log-level=debug

The command:

The result (a part of it):

It will provide you with detailed prints of everything you do and what happens.

Avatar
Discard
Author

Your command increase the debug level of --debug. But all the debug is still written in the log file ONLY. And not at the screen. Does not solve my problem. thanks

I'm not sure what you mean by is still written in the log file ONLY? You can clearly see the debug statements in my screenshot that shows you the extra information, for example the starting of the cron jobs.. That's exactly what you'd need I presume :/

Author

To get only the debug statement In the TERMINAL and in the LOG file. I think you have disabled you log-file in open-server.conf to get the message in the terminal. No prob. Have a good day.

I haven't disabled / changed anything, this works out of the box. This will write both to the terminal and to your logfile too.

while terminal starting server below command ./openerp-server -c /etc/openerp-server.conf server started but terminal not display any info or debug error message. log level debug defined in odoo config file but not display in terminal. Any updates? regarding this issue.

Best Answer

Use the I/O indirection and tee (see the explanation from http://stackoverflow.com/questions/418896/how-to-redirect-output-to-a-file-and-stdout and other pages).  Run your OpenERP from command line without any logfile switch, not even in the configuration file (comment it out with #).  This way it will output the log to stdout.  Add 2>&1 | tee /var/log/odoo/odoo-server.log after the command to write it to the log file as well.  The 2>&1 part will also redirect stderr to stdout.

Avatar
Discard
Author

very interesting. I have to think about it. Thanks