Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

How to debug openerp-server directly in terminal

By
Pascal Tremblay
on 12/15/14, 9:50 AM 3,148 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?

 

0

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 12/15/14, 10:06 AM

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.

very interesting. I have to think about it. Thanks

Pascal Tremblay
on 12/15/14, 7:13 PM
0

Yenthe

--Yenthe--
6716
| 7 7 8
Turnhout, Belgium
--Yenthe--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe
On 12/15/14, 10:11 AM

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.

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

Pascal Tremblay
on 12/15/14, 7:12 PM

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 :/

Yenthe
on 12/16/14, 1:55 AM

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.

Pascal Tremblay
on 12/16/14, 6:59 AM

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

Yenthe
on 12/16/14, 7:08 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/15/14, 9:50 AM
Seen: 3148 times
Last updated: 3/16/15, 8:10 AM