← Back to team overview

openerp-dev-web team mailing list archive

Re: lp:~openerp-dev/openobject-client/trunk-add-datetime-in-logfile-rga into lp:openobject-client

 

Review: Resubmit
Hello Ravi,

The improvement seems nice. It adds the date and time in the log to ease the debugging.
but a few changes should be done to make it  more perfect.

IMPROVEMENT:
------------
add one option -w --write_to_config     save configuration to ~/.openerprc

you need to see that you update the config file only if the "-w" option is present at the command line args.so take the info from args and if it's not specified in args take the one in config file
but don't save what you passed in arg unless "-w".

FEW PROBLEMS:
------------
1: when you pass the argument --logfile=/path/ the content saved in this files contains garbage values too.for eg:

1: difference in log on standard output and in logfile:

[2011-03-14 15:41:36,672][?] DEBUG_RPC:rpc.request:('execute', 'trunk', 1, '*', ('res.users', 'context_get'))
[2011-03-14 15:41:36,677][?] WARNING:translate:Unable to set locale en_US.ISO8859-1: unsupported locale setting.

2: conflicts between logfile / syslog :

   as you use the path from the .openerprc if you once start with a path say as --logfile=/home/nch/Desktop/test.log so you get the logs in test.log file also the entry in .openerprc file is updated to have logfile = '/home/nch/Desktop/test.log'
so now restart client with arg --syslog and dont provide the --logfile arg so here the log still goes in test.log.
but there is no log in --syslog

3: logrotate put better arguments, like better max file size, the limit etc...


Thanks



-- 
https://code.launchpad.net/~openerp-dev/openobject-client/trunk-add-datetime-in-logfile-rga/+merge/52832
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-client/trunk-add-datetime-in-logfile-rga.



References