Re: librbd++: How to access more detailed error messages?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, May 15, 2013, Guido Winkelmann wrote:
Hi,

When using librbd, one usually just gets a simple error code from RBD methods
if something goes wrong, and those sometime have me guessing exactly what they
could mean in a specific situation.

While perusing librbd/internal.cc, I noticed that many of the methods in the
background will produce more detailed error messages, like this line from
snap_protect():

lderr(ictx->cct) << "snap_protect: image must support layering"
       << dendl;

How do I access those more detailed error messages?

        Guido

You've discovered our debug logging generators! Those line outputting to lderr are directed to both stderr and our own debug logs; those directed to ldout are directed to just our debug logs. You can configure librbd so it will output this on startup via any of the config interfaces. There's not a good way to parse it via code, though -- it's meant for humans to consume.
-Greg


--
Software Engineer #42 @ http://inktank.com | http://ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux