Log: new logging library API

Prepare to migrate away from GLib.  Currently, we're still using GLib
as a backend.
This commit is contained in:
Max Kellermann
2013-09-27 22:31:24 +02:00
parent c53492a76a
commit 060814daa8
162 changed files with 1992 additions and 1280 deletions

View File

@@ -23,6 +23,7 @@
#include "system/FatalError.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
#include "gcc.h"
#include <glib.h>
@@ -35,9 +36,6 @@
#include <stdio.h> // for sprintf()
#endif
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "path"
/**
* Maximal number of bytes required to represent path name in UTF-8
* (including nul-terminator).
@@ -145,7 +143,8 @@ SetFSCharset(const char *charset)
fs_charset = charset;
g_debug("SetFSCharset: fs charset is: %s", fs_charset.c_str());
FormatDebug(path_domain,
"SetFSCharset: fs charset is: %s", fs_charset.c_str());
}
const std::string &Path::GetFSCharset()
@@ -180,7 +179,8 @@ void Path::GlobalInit()
if (charset) {
SetFSCharset(charset);
} else {
g_message("setting filesystem charset to ISO-8859-1");
LogDebug(path_domain,
"setting filesystem charset to ISO-8859-1");
SetFSCharset("ISO-8859-1");
}
}