tags:

views:

422

answers:

5

Hi !

I want to do the opposite of everybody ( laugh ) I start open-erp with a command line like :

C:\OpenERPAllInOne\Server>openerp-server.exe --log-file=outputfile

but the problem is that with Windows it only does output to a file.

Is there any way to redirect a file to the STDOUT. For example (it doesn't work but this is the way I see it working) :

C:\OpenERPAllInOne\Server>openerp-server.exe --log-file=STDOUT

and then see directly the output to the command line.

I can't make it work ! Any idea ?

Thanks,

Olivier

A: 

That would be a function of the openerp-server.exe program.

If it's default output is to a file, then there isn't anything you can do about that.

databyss
This is possible it works with 'CON' :)
Olivier Pons
+3  A: 

I'm not sure if it still works, try CON (hope it was that) as filename

Cem Kalyoncu
Thanks very much it works hurra !
Olivier Pons
A: 

I'm assuming that OpenERP uses getopt_long and confirms to GNU standards. If it does, then the following should work:

openerp-server --log-file=-

(a dash is usually used to represent STDOUT in GNU, Linux and UNIX programs.)

Aviral Dasgupta
It's with Windows (with Linux it already outputs everyting to STDOUT), with "--log_file=CON" it works :)
Olivier Pons
It's kinda equivalent... "-" (linux) == /dev/stdout (linux) == CON (w32). Odd how they call stdout "*con*sole"
Aviral Dasgupta
It is actually very old stuff from MS-DOS 5.0 I think. There is also PRN (remember dot matrix printers that can print line by line), COMM1 and COMM2. These are special files like /dev/stdout for MS-DOS. After all these years its interesting that they still work.
Cem Kalyoncu
Now I checked them its COM1 and COM2 not COMM1 and COMM2
Cem Kalyoncu
A: 

If you can't get the server to output to the standard output you could monitor the log file with [tail][1].

If you run:

tail -f c:\path\to\logfile.txt

in another window then you can see the contents of the file as they are written.

tail doesn't come with Windows as standard but you can download a free port of tail for Windows here.

Dave Webb
this only works if the log file is not locked and the process that is writing the log file, flushes it after each line. However worth a try..
Ian Ringrose
A: 

for windows there is a configuration file for OpenERP Server, like openerp-server.conf in the directory where you have installed the Open ERP

like c:\Program Files\OpenERP Server\openerp-server.conf OR
C:\documents and settings\USER\OpenERP Server\oepenrp-server.conf

you need to edit that file and set the --log-file paramter to None or False, and probably you might also try out something like this

C:\OpenERPAllInOne\Server>openerp-server.exe --log-file=False

that should work, but not sure whether it will work or not.!!

Tumbleweed
It doesn't work because I when I asked this question I was IN the Tiny house, in formation in Belgium and the developper himself told us he didn't know how to do it under Windows (they all use Linux, not Windows). (Don't hesitate to edit my comment to make it proper English)
Olivier Pons
did you try to modify the original config file from start menu-> openerp server -> edit configuration and set the log-file to None it worked for me
Tumbleweed
no i didn't but i'll check it out later thanks for the hint :)
Olivier Pons