Log: remove the obsolete printf-style functions

This commit is contained in:
Max Kellermann
2021-10-13 16:08:48 +02:00
parent 2fbbd540bb
commit 72f6e018e7
17 changed files with 102 additions and 283 deletions

View File

@@ -19,10 +19,14 @@
#include "RemoteTagCache.hxx"
#include "RemoteTagCacheHandler.hxx"
#include "lib/fmt/ExceptionFormatter.hxx"
#include "input/ScanTags.hxx"
#include "util/DeleteDisposer.hxx"
#include "util/Domain.hxx"
#include "Log.hxx"
static constexpr Domain remote_tag_cache_domain("remote_tag_cache");
RemoteTagCache::RemoteTagCache(EventLoop &event_loop,
RemoteTagCacheHandler &_handler) noexcept
:handler(_handler),
@@ -60,9 +64,9 @@ RemoteTagCache::Lookup(const std::string &uri) noexcept
item->scanner->Start();
} catch (...) {
FormatError(std::current_exception(),
"Failed to scan tags of '%s'",
uri.c_str());
FmtError(remote_tag_cache_domain,
"Failed to scan tags of '{}': {}",
uri, std::current_exception());
item->scanner.reset();
@@ -128,7 +132,8 @@ RemoteTagCache::Item::OnRemoteTag(Tag &&_tag) noexcept
void
RemoteTagCache::Item::OnRemoteTagError(std::exception_ptr e) noexcept
{
FormatError(e, "Failed to scan tags of '%s'", uri.c_str());
FmtError(remote_tag_cache_domain,
"Failed to scan tags of '{}': {}", uri, e);
scanner.reset();