Yarp: Alternative to the --verbose option

Created on 22 Oct 2020  路  3Comments  路  Source: robotology/yarp

In yarp-3.4 the --verbose option is deprecated. I was finding this feature particularly handy when using the ResourceFinder as it was helping to debug where a certain file was searched. Nevertheless, if I run yarp resource --find something.ini --verbose, I get

yarp resource --find something.ini --verbose
[WARNING] |yarp.os.ResourceFinder| The 'verbose' option is deprecated.
[WARNING] |yarp.os.ResourceFinder| The 'verbose' option is deprecated.
[ERROR] |yarp.os.Property| cannot read from something.ini
""

I simply get a warning, but no alternative and no verbose output. Is there a way to circumvent this?

QSupport Answered

Most helpful comment

The verbose option was superseded by logging components in https://github.com/robotology/yarp/commit/301926c2f67c26dba4a7fd28930de99d7ad8c4cc, here and in several other places around YARP's codebase (search for deprecations in the v3.4.0 release notes).

I see the helper toDox method is still there, this is how the verbose output was being printed to console. Now, it takes advantage of yCDebug macros. According to Logging with YARP docs, you should set the YARP_VERBOSE environment variable to 1 in order to enable debug lines in YARP itself:

YARP_VERBOSE=1 yarp resource --find something.ini

All 3 comments

The verbose option was superseded by logging components in https://github.com/robotology/yarp/commit/301926c2f67c26dba4a7fd28930de99d7ad8c4cc, here and in several other places around YARP's codebase (search for deprecations in the v3.4.0 release notes).

I see the helper toDox method is still there, this is how the verbose output was being printed to console. Now, it takes advantage of yCDebug macros. According to Logging with YARP docs, you should set the YARP_VERBOSE environment variable to 1 in order to enable debug lines in YARP itself:

YARP_VERBOSE=1 yarp resource --find something.ini

Thanks a lot @PeterBowman, that was exactly what I was looking for.

:wave: @S-Dafarra, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a question, a setup issue, or a support request. Please use our Q&A repository to get help next time. This issue will be moved to the correct issue tracker by a human ASAP, so that you can get proper support.

Was this page helpful?
0 / 5 - 0 ratings