#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <syslog.h>
#include <loc/libloc.h>
#include <loc/database.h>
if (err < 0)
exit(EXIT_FAILURE);
+ // Enable debug logging
+ loc_set_log_priority(ctx, LOG_DEBUG);
+
// Create a database
struct loc_writer* writer;
err = loc_writer_new(ctx, &writer, NULL, NULL);
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
+#include <syslog.h>
#include <loc/libloc.h>
#include <loc/country.h>
if (err < 0)
exit(EXIT_FAILURE);
+ // Enable debug logging
+ loc_set_log_priority(ctx, LOG_DEBUG);
+
// Create a database
struct loc_writer* writer;
err = loc_writer_new(ctx, &writer, NULL, NULL);
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
+#include <syslog.h>
#include <loc/libloc.h>
#include <loc/database.h>
if (err < 0)
exit(EXIT_FAILURE);
+ // Enable debug logging
+ loc_set_log_priority(ctx, LOG_DEBUG);
+
// Try opening an empty file
err = attempt_to_open(ctx, "/dev/null");
if (err == 0)
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
+#include <syslog.h>
#include <loc/libloc.h>
if (err < 0)
exit(EXIT_FAILURE);
+ // Enable debug logging
+ loc_set_log_priority(ctx, LOG_DEBUG);
+
printf("version %s\n", VERSION);
loc_unref(ctx);
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
+#include <syslog.h>
#include <loc/libloc.h>
#include <loc/database.h>
if (err < 0)
exit(EXIT_FAILURE);
+ // Enable debug logging
+ loc_set_log_priority(ctx, LOG_DEBUG);
+
struct loc_network_tree* tree;
err = loc_network_tree_new(ctx, &tree);
if (err) {
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
+#include <syslog.h>
#include <loc/libloc.h>
#include <loc/database.h>
if (err < 0)
exit(EXIT_FAILURE);
+ // Enable debug logging
+ loc_set_log_priority(ctx, LOG_DEBUG);
+
// Create an empty database
struct loc_writer* writer;
err = loc_writer_new(ctx, &writer, private_key1, private_key2);
#include <errno.h>
#include <unistd.h>
#include <time.h>
+#include <syslog.h>
#include <loc/libloc.h>
#include <loc/stringpool.h>
if (err < 0)
exit(EXIT_FAILURE);
+ // Enable debug logging
+ loc_set_log_priority(ctx, LOG_DEBUG);
+
// Create the stringpool
struct loc_stringpool* pool;
err = loc_stringpool_new(ctx, &pool);