Re: [libvirt] [PATCH] Print hex values with '0x' prefix and octal with '0' in debug messages
On Monday, 25 September 2017 14:33:42 CEST Daniel P. Berrange wrote: > On Mon, Sep 25, 2017 at 02:12:33PM +0200, Pino Toscano wrote: > > On Monday, 25 September 2017 12:45:51 CEST Daniel P. Berrange wrote: > > > Seeing a log message saying 'flags=93' is ambiguous & confusing unless > > > you happen to know that libvirt always prints flags as hex. Change our > > > debug messages so that they always add a '0x' prefix when printing flags, > > > and '0' prefix when printing mode. A few other misc places gain a '0x' > > > prefix in error messages too. > > > > > > Signed-off-by: Daniel P. Berrange > > > --- > > > po/af.po | 4 +- > > > po/am.po | 4 +- > > > po/anp.po | 4 +- > > > po/ar.po | 4 +- > > > po/as.po | 12 +- > > > po/ast.po | 4 +- > > > po/bal.po | 4 +- > > > po/be.po | 4 +- > > > po/bg.po | 4 +- > > > po/bn.po | 4 +- > > > po/bn_IN.po | 12 +- > > > po/bo.po | 4 +- > > > po/br.po | 4 +- > > > po/brx.po | 4 +- > > > po/bs.po | 4 +- > > > po/ca.po | 12 +- > > > po/cs.po | 4 +- > > > po/cy.po | 4 +- > > > po/da.po | 4 +- > > > po/de.po | 12 +- > > > po/de_CH.po | 4 +- > > > po/el.po | 4 +- > > > po/en_GB.po | 4 +- > > > po/eo.po | 4 +- > > > po/es.po | 12 +- > > > po/et.po | 4 +- > > > po/eu.po | 4 +- > > > po/fa.po | 4 +- > > > po/fi.po | 4 +- > > > po/fr.po | 4 +- > > > po/gl.po | 4 +- > > > po/gu.po | 12 +- > > > po/he.po | 4 +- > > > po/hi.po | 12 +- > > > po/hr.po | 4 +- > > > po/hu.po | 4 +- > > > po/ia.po | 4 +- > > > po/id.po | 4 +- > > > po/ilo.po | 4 +- > > > po/is.po | 4 +- > > > po/it.po | 12 +- > > > po/ja.po | 12 +- > > > po/ka.po | 4 +- > > > po/kk.po | 4 +- > > > po/km.po | 4 +- > > > po/kn.po | 12 +- > > > po/ko.po | 12 +- > > > po/kw.po | 4 +- > > > po/k...@kkcor.po| 4 +- > > > po/k...@uccor.po| 4 +- > > > po/kw_GB.po | 4 +- > > > po/ky.po | 4 +- > > > po/libvirt.pot| 4 +- > > > po/lt.po | 4 +- > > > po/lv.po | 4 +- > > > po/mai.po | 4 +- > > > po/mk.po | 4 +- > > > po/ml.po | 12 +- > > > po/mn.po | 4 +- > > > po/mr.po | 4 +- > > > po/ms.po | 4 +- > > > po/nb.po | 4 +- > > > po/nds.po | 4 +- > > > po/ne.po | 4 +- > > > po/nl.po | 12 +- > > > po/nn.po | 4 +- > > > po/nso.po | 4 +- > > > po/or.po | 4 +- > > > po/pa.po | 12 +- > > > po/pl.po | 12 +- > > > po/pt.po | 4 +- > > > po/pt_BR.po | 12 +- > > > po/ro.po | 4 +- > > > po/ru.po | 8 +- > > > po/si.po | 4 +- > > > po/sk.po | 4 +- > > > po/sl.po | 4 +- > > > po/sq.po | 4 +- > > > po/sr.po | 4 +- > > > po/s...@latin.po| 4 +- > > > po/sv.po | 12 +- > > > po/ta.po | 4 +- > > > po/te.po | 12 +- > > > po/tg.po | 4 +- > > > po/th.po | 4 +- > > > po/tr.po | 4 +- > > > po/tw.po | 4 +- > > > po/uk.po
Re: [libvirt] [PATCH] Print hex values with '0x' prefix and octal with '0' in debug messages
On Mon, Sep 25, 2017 at 02:12:33PM +0200, Pino Toscano wrote: > On Monday, 25 September 2017 12:45:51 CEST Daniel P. Berrange wrote: > > Seeing a log message saying 'flags=93' is ambiguous & confusing unless > > you happen to know that libvirt always prints flags as hex. Change our > > debug messages so that they always add a '0x' prefix when printing flags, > > and '0' prefix when printing mode. A few other misc places gain a '0x' > > prefix in error messages too. > > > > Signed-off-by: Daniel P. Berrange > > --- > > po/af.po | 4 +- > > po/am.po | 4 +- > > po/anp.po | 4 +- > > po/ar.po | 4 +- > > po/as.po | 12 +- > > po/ast.po | 4 +- > > po/bal.po | 4 +- > > po/be.po | 4 +- > > po/bg.po | 4 +- > > po/bn.po | 4 +- > > po/bn_IN.po | 12 +- > > po/bo.po | 4 +- > > po/br.po | 4 +- > > po/brx.po | 4 +- > > po/bs.po | 4 +- > > po/ca.po | 12 +- > > po/cs.po | 4 +- > > po/cy.po | 4 +- > > po/da.po | 4 +- > > po/de.po | 12 +- > > po/de_CH.po | 4 +- > > po/el.po | 4 +- > > po/en_GB.po | 4 +- > > po/eo.po | 4 +- > > po/es.po | 12 +- > > po/et.po | 4 +- > > po/eu.po | 4 +- > > po/fa.po | 4 +- > > po/fi.po | 4 +- > > po/fr.po | 4 +- > > po/gl.po | 4 +- > > po/gu.po | 12 +- > > po/he.po | 4 +- > > po/hi.po | 12 +- > > po/hr.po | 4 +- > > po/hu.po | 4 +- > > po/ia.po | 4 +- > > po/id.po | 4 +- > > po/ilo.po | 4 +- > > po/is.po | 4 +- > > po/it.po | 12 +- > > po/ja.po | 12 +- > > po/ka.po | 4 +- > > po/kk.po | 4 +- > > po/km.po | 4 +- > > po/kn.po | 12 +- > > po/ko.po | 12 +- > > po/kw.po | 4 +- > > po/k...@kkcor.po| 4 +- > > po/k...@uccor.po| 4 +- > > po/kw_GB.po | 4 +- > > po/ky.po | 4 +- > > po/libvirt.pot| 4 +- > > po/lt.po | 4 +- > > po/lv.po | 4 +- > > po/mai.po | 4 +- > > po/mk.po | 4 +- > > po/ml.po | 12 +- > > po/mn.po | 4 +- > > po/mr.po | 4 +- > > po/ms.po | 4 +- > > po/nb.po | 4 +- > > po/nds.po | 4 +- > > po/ne.po | 4 +- > > po/nl.po | 12 +- > > po/nn.po | 4 +- > > po/nso.po | 4 +- > > po/or.po | 4 +- > > po/pa.po | 12 +- > > po/pl.po | 12 +- > > po/pt.po | 4 +- > > po/pt_BR.po | 12 +- > > po/ro.po | 4 +- > > po/ru.po | 8 +- > > po/si.po | 4 +- > > po/sk.po | 4 +- > > po/sl.po | 4 +- > > po/sq.po | 4 +- > > po/sr.po | 4 +- > > po/s...@latin.po| 4 +- > > po/sv.po | 12 +- > > po/ta.po | 4 +- > > po/te.po | 12 +- > > po/tg.po | 4 +- > > po/th.po | 4 +- > > po/tr.po | 4 +- > > po/tw.po | 4 +- > > po/uk.po | 4 +- > > po/ur.po | 4 +- > > po/vi.po | 4 +- > > po/wba.po | 4 +- > > po/yo.po | 4 +- > > po/zh_CN.po | 4 +- > > p
Re: [libvirt] [PATCH] Print hex values with '0x' prefix and octal with '0' in debug messages
On Monday, 25 September 2017 12:45:51 CEST Daniel P. Berrange wrote: > Seeing a log message saying 'flags=93' is ambiguous & confusing unless > you happen to know that libvirt always prints flags as hex. Change our > debug messages so that they always add a '0x' prefix when printing flags, > and '0' prefix when printing mode. A few other misc places gain a '0x' > prefix in error messages too. > > Signed-off-by: Daniel P. Berrange > --- > po/af.po | 4 +- > po/am.po | 4 +- > po/anp.po | 4 +- > po/ar.po | 4 +- > po/as.po | 12 +- > po/ast.po | 4 +- > po/bal.po | 4 +- > po/be.po | 4 +- > po/bg.po | 4 +- > po/bn.po | 4 +- > po/bn_IN.po | 12 +- > po/bo.po | 4 +- > po/br.po | 4 +- > po/brx.po | 4 +- > po/bs.po | 4 +- > po/ca.po | 12 +- > po/cs.po | 4 +- > po/cy.po | 4 +- > po/da.po | 4 +- > po/de.po | 12 +- > po/de_CH.po | 4 +- > po/el.po | 4 +- > po/en_GB.po | 4 +- > po/eo.po | 4 +- > po/es.po | 12 +- > po/et.po | 4 +- > po/eu.po | 4 +- > po/fa.po | 4 +- > po/fi.po | 4 +- > po/fr.po | 4 +- > po/gl.po | 4 +- > po/gu.po | 12 +- > po/he.po | 4 +- > po/hi.po | 12 +- > po/hr.po | 4 +- > po/hu.po | 4 +- > po/ia.po | 4 +- > po/id.po | 4 +- > po/ilo.po | 4 +- > po/is.po | 4 +- > po/it.po | 12 +- > po/ja.po | 12 +- > po/ka.po | 4 +- > po/kk.po | 4 +- > po/km.po | 4 +- > po/kn.po | 12 +- > po/ko.po | 12 +- > po/kw.po | 4 +- > po/k...@kkcor.po| 4 +- > po/k...@uccor.po| 4 +- > po/kw_GB.po | 4 +- > po/ky.po | 4 +- > po/libvirt.pot| 4 +- > po/lt.po | 4 +- > po/lv.po | 4 +- > po/mai.po | 4 +- > po/mk.po | 4 +- > po/ml.po | 12 +- > po/mn.po | 4 +- > po/mr.po | 4 +- > po/ms.po | 4 +- > po/nb.po | 4 +- > po/nds.po | 4 +- > po/ne.po | 4 +- > po/nl.po | 12 +- > po/nn.po | 4 +- > po/nso.po | 4 +- > po/or.po | 4 +- > po/pa.po | 12 +- > po/pl.po | 12 +- > po/pt.po | 4 +- > po/pt_BR.po | 12 +- > po/ro.po | 4 +- > po/ru.po | 8 +- > po/si.po | 4 +- > po/sk.po | 4 +- > po/sl.po | 4 +- > po/sq.po | 4 +- > po/sr.po | 4 +- > po/s...@latin.po| 4 +- > po/sv.po | 12 +- > po/ta.po | 4 +- > po/te.po | 12 +- > po/tg.po | 4 +- > po/th.po | 4 +- > po/tr.po | 4 +- > po/tw.po | 4 +- > po/uk.po | 4 +- > po/ur.po | 4 +- > po/vi.po | 4 +- > po/wba.po | 4 +- > po/yo.po | 4 +- > po/zh_CN.po | 4 +- > po/zh_HK.po | 4 +- > po/zh_TW.po | 4 +- > po/zu.po | 4 +- Considering template and translations are automatically synchronized from Zanata, I'd leave the changes above out of the patch. --
Re: [libvirt] [PATCH] Print hex values with '0x' prefix and octal with '0' in debug messages
On Mon, Sep 25, 2017 at 11:45:51AM +0100, Daniel P. Berrange wrote: > Seeing a log message saying 'flags=93' is ambiguous & confusing unless > you happen to know that libvirt always prints flags as hex. Change our > debug messages so that they always add a '0x' prefix when printing flags, > and '0' prefix when printing mode. A few other misc places gain a '0x' > prefix in error messages too. Thanks, this is useful. I always have to pause a bit, and `grep` around to remind myself that they're in hex. [...] > Signed-off-by: Daniel P. Berrange FWIW: Acked-by: Kashyap Chamarthy [...] > 131 files changed, 552 insertions(+), 552 deletions(-) [...] -- /kashyap -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Print hex values with '0x' prefix and octal with '0' in debug messages
On Mon, Sep 25, 2017 at 11:45:51AM +0100, Daniel P. Berrange wrote: Seeing a log message saying 'flags=93' is ambiguous & confusing unless you happen to know that libvirt always prints flags as hex. Change our debug messages so that they always add a '0x' prefix when printing flags, and '0' prefix when printing mode. A few other misc places gain a '0x' prefix in error messages too. Signed-off-by: Daniel P. Berrange --- ACK On top of these, the flagx= typo in virNodeAllocPages might deserve to be included in this patch. Not sure about virAdmServerSetThreadPoolParameters which is the only one using hex format for nparams: src/libvirt-admin.c=826=virAdmServerSetThreadPoolParameters(virAdmServerPtr srv, -- src/libvirt-admin.c:831:VIR_DEBUG("srv=%p, params=%p, nparams=%x, flags=0x%x", src/libvirt-admin.c-832- srv, params, nparams, flags); -- src/libvirt-domain.c=11901=virDomainSetGuestVcpus(virDomainPtr domain, -- src/libvirt-domain.c:11906:VIR_DOMAIN_DEBUG(domain, "cpumap='%s' state=%x flags=0x%x", src/libvirt-domain.c-11907- NULLSTR(cpumap), state, flags); -- src/libvirt-host.c=1448=virNodeAllocPages(virConnectPtr conn, -- src/libvirt-host.c-1456-VIR_DEBUG("conn=%p npages=%u pageSizes=%p pageCounts=%p " src/libvirt-host.c:1457: "startCell=%d cellCount=%u flagx=%x", src/libvirt-host.c-1458- conn, npages, pageSizes, pageCounts, startCell, src/libvirt-host.c-1459- cellCount, flags); Jan signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Print hex values with '0x' prefix and octal with '0' in debug messages
On Mon, Sep 25, 2017 at 01:27:24PM +0200, Ján Tomko wrote: > On Mon, Sep 25, 2017 at 11:45:51AM +0100, Daniel P. Berrange wrote: > > Seeing a log message saying 'flags=93' is ambiguous & confusing unless > > you happen to know that libvirt always prints flags as hex. Change our > > debug messages so that they always add a '0x' prefix when printing flags, > > and '0' prefix when printing mode. A few other misc places gain a '0x' > > prefix in error messages too. > > > > Signed-off-by: Daniel P. Berrange > > --- > > ACK > > On top of these, the flagx= typo in virNodeAllocPages might deserve to > be included in this patch. Not sure about virAdmServerSetThreadPoolParameters > which is the only one using hex format for nparams: > > src/libvirt-admin.c=826=virAdmServerSetThreadPoolParameters(virAdmServerPtr > srv, > -- > src/libvirt-admin.c:831:VIR_DEBUG("srv=%p, params=%p, nparams=%x, > flags=0x%x", > src/libvirt-admin.c-832- srv, params, nparams, flags); Yeah, nparams should definitely be %d > -- > src/libvirt-domain.c=11901=virDomainSetGuestVcpus(virDomainPtr domain, > -- > src/libvirt-domain.c:11906:VIR_DOMAIN_DEBUG(domain, "cpumap='%s' state=%x > flags=0x%x", > src/libvirt-domain.c-11907- NULLSTR(cpumap), state, > flags); Heh, 'state' is just a boolean 0 or 1, so should relaly just be %d > -- > src/libvirt-host.c=1448=virNodeAllocPages(virConnectPtr conn, > -- > src/libvirt-host.c-1456-VIR_DEBUG("conn=%p npages=%u pageSizes=%p > pageCounts=%p " > src/libvirt-host.c:1457: "startCell=%d cellCount=%u flagx=%x", > src/libvirt-host.c-1458- conn, npages, pageSizes, pageCounts, > startCell, > src/libvirt-host.c-1459- cellCount, flags); Ok, I'll squash these 3 changes in. Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list