errors that aren't errors

I've this deployment function that loops through a list of packages, and tries to import them.
If the package contains orocos instances, I want it to import those instances, as the function normally works,
if the package doesn't contain orocos instances, I want it to return false (as it does correctly), but I don't want it to log an error, as it does now,
since this not an error for my use case, how can I prevent it to log that error, without just deleting it in the ocl/rtt code (the error does make sense in most use cases).
BTW why is it an error, since it can and will continue normal operation (as long as you dealt with the false return statement)

On Thu, Dec 6, 2012 at 1:13 PM, Dominick Vanthienen
<dominick [dot] vanthienen [..] ...> wrote:
> hi,
>
> I've this deployment function that loops through a list of packages, and tries to import them.
> If the package contains orocos instances, I want it to import those instances, as the function normally works,
> if the package doesn't contain orocos instances, I want it to return false (as it does correctly), but I don't want it to log an error, as it does now,
> since this not an error for my use case, how can I prevent it to log that error, without just deleting it in the ocl/rtt code (the error does make sense in most use cases).
> BTW why is it an error, since it can and will continue normal operation (as long as you dealt with the false return statement)

I understand. I would propose then to allow to tune the verbosity of
this part individually (somehow). One possible improvement for the
future would be to make our own logging framework standard, such that
all such messages can be directed to the traditional logging channels
(ala ROS).

On Thu, Dec 06, 2012 at 01:13:35PM +0100, Dominick Vanthienen wrote:
> hi,
>
> I've this deployment function that loops through a list of packages, and tries to import them.
> If the package contains orocos instances, I want it to import those instances, as the function normally works,
> if the package doesn't contain orocos instances, I want it to return false (as it does correctly), but I don't want it to log an error, as it does now,
> since this not an error for my use case, how can I prevent it to log
> that error, without just deleting it in the ocl/rtt code (the error
> does make sense in most use cases).

As a quick and dirty solution: disable and enable the logging before
and after the import. Print your own error if it fails. E.g. in Lua: