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

Proposed by Ravi Gadhia (OpenERP)
Status: Needs review
Proposed branch: lp://staging/~openerp-dev/openobject-client/trunk-add-datetime-in-logfile-rga
Merge into: lp://staging/openobject-client
Diff against target: 325 lines (+164/-38)
5 files modified
bin/loglevel.py (+110/-0)
bin/modules/gui/main.py (+0/-1)
bin/openerp-client.py (+12/-22)
bin/options.py (+40/-15)
bin/rpc.py (+2/-0)
To merge this branch: bzr merge lp://staging/~openerp-dev/openobject-client/trunk-add-datetime-in-logfile-rga
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Approve
Review via email: mp+54338@code.staging.launchpad.net

This proposal supersedes a proposal from 2011-03-18.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote : Posted in a previous version of this proposal

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

review: Needs Resubmitting
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote : Posted in a previous version of this proposal

Hello,

The option added "-w" doesnt work,
even now the logs are not displaying if I pass -l debug_rpc to see the rpc request on the terminal.
but they are not there, where as I have not mentioned any "logfile" or "syslog" option.

Please test that what the proposal is for does atleast work.

Thanks

review: Needs Fixing
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote : Posted in a previous version of this proposal

if you dont pass the option as said above it creates the logfile in bin/ folder with ''(blank) name.
this should not be the case.

Thanks

Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Unmerged revisions

1842. By Ravi Gadhia (OpenERP)

[Fix] Command line option -w (write_to_config)

1841. By Ravi Gadhia (OpenERP)

Merge with trunk client

1840. By Ravi Gadhia (OpenERP)

[IMP] add config option -w (write_to_config)

1839. By Ravi Gadhia (OpenERP)

Merge with trunk client

1838. By Ravi Gadhia (OpenERP)

Merge with trunk client

1837. By Ravi Gadhia (OpenERP)

Merge with trunk client

1836. By Ravi Gadhia (OpenERP)

typo

1835. By Ravi Gadhia (OpenERP)

Merge with trunk-client

1834. By Ravi Gadhia (OpenERP)

[Imp] Logger:windows specific changes

1833. By Ravi Gadhia (OpenERP)

[IMP]logger: assignee stream handler because here our logger handler is not loaded by init_logger()

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.