sr: Implement proper logging framework.
authorUwe Hermann <uwe@hermann-uwe.de>
Wed, 8 Feb 2012 21:04:13 +0000 (22:04 +0100)
committerUwe Hermann <uwe@hermann-uwe.de>
Fri, 10 Feb 2012 08:30:40 +0000 (09:30 +0100)
This is pretty much identical to the current libsigrokdecode API/framework.

sigrok-cli.c

index 15bad14f7f16d865e1589aa2ff22b178c7173223..50fec3997874014b395f262e3f5a822342c13580 100644 (file)
@@ -986,8 +986,8 @@ int main(int argc, char **argv)
        }
 
        /* Set the loglevel (amount of messages to output) for libsigrok. */
-       if (sr_set_loglevel(opt_loglevel) != SR_OK) {
-               fprintf(stderr, "cli: %s: sr_set_loglevel(%d) failed\n",
+       if (sr_log_loglevel_set(opt_loglevel) != SR_OK) {
+               fprintf(stderr, "cli: %s: sr_log_loglevel_set(%d) failed\n",
                        __func__, opt_loglevel);
                return 1;
        }