#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <syslog.h>
#include <time.h>
#include <libusb-1.0/libusb.h>
libusb_device *dev = devlist[i];
if (!libusb_get_device_descriptor(dev, &desc)) {
if (desc.idVendor == 0x4242 && desc.idProduct == 0x0002) {
- msg(L_INFO, "Found SSR module at usb%d.%d\n", libusb_get_bus_number(dev), libusb_get_device_address(dev));
+ msg(L_INFO, "Found SSR module at usb%d.%d", libusb_get_bus_number(dev), libusb_get_device_address(dev));
if (err = libusb_open(dev, &devh))
die("Cannot open device: error %d", err);
int main(int argc UNUSED, char **argv)
{
+ log_init(argv[0]);
opt_parse(&options, argv+1);
if (use_daemon) {
- struct log_stream *ls = log_new_syslog("daemon", 0);
+ struct log_stream *ls = log_new_syslog("daemon", LOG_PID);
log_set_default_stream(ls);
}
if (!use_debug)