From 060814daa83f6a94f5934464ae42a406c5c7e947 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 27 Sep 2013 22:31:24 +0200 Subject: Log: new logging library API Prepare to migrate away from GLib. Currently, we're still using GLib as a backend. --- src/ArchiveLookup.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/ArchiveLookup.cxx') diff --git a/src/ArchiveLookup.cxx b/src/ArchiveLookup.cxx index 747f5c7e5..c781fcdaf 100644 --- a/src/ArchiveLookup.cxx +++ b/src/ArchiveLookup.cxx @@ -19,15 +19,17 @@ #include "config.h" /* must be first for large file support */ #include "ArchiveLookup.hxx" +#include "util/Domain.hxx" +#include "Log.hxx" -#include +#include #include -#include #include #include #include -#include + +static constexpr Domain archive_domain("archive"); /** * @@ -65,7 +67,8 @@ bool archive_lookup(char *pathname, char **archive, char **inpath, char **suffix //try to stat if its real directory if (stat(pathdupe, &st_info) == -1) { if (errno != ENOTDIR) { - g_warning("stat %s failed (errno=%d)\n", pathdupe, errno); + FormatErrno(archive_domain, + "Failed to stat %s", pathdupe); break; } } else { @@ -92,7 +95,9 @@ bool archive_lookup(char *pathname, char **archive, char **inpath, char **suffix } break; } else { - g_warning("not a regular file %s\n", pathdupe); + FormatError(archive_domain, + "Not a regular file: %s", + pathdupe); break; } } -- cgit v1.2.3