diff options
author | Alexander Tkachev | 2016-07-23 12:52:27 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 15c6772ff7638e104027f7b7777180e6191841fc (patch) | |
tree | 7887ce51ef6c3d6fd7ab574aa0e7da85d47067f8 /backends/cloud/box/boxstorage.cpp | |
parent | d57e0c89b5b20dac247cb2f43450014d84719ba6 (diff) | |
download | scummvm-rg350-15c6772ff7638e104027f7b7777180e6191841fc.tar.gz scummvm-rg350-15c6772ff7638e104027f7b7777180e6191841fc.tar.bz2 scummvm-rg350-15c6772ff7638e104027f7b7777180e6191841fc.zip |
ALL: Fix debug, warning and error usage
Added prefixes, used debug(9).
Diffstat (limited to 'backends/cloud/box/boxstorage.cpp')
-rw-r--r-- | backends/cloud/box/boxstorage.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/backends/cloud/box/boxstorage.cpp b/backends/cloud/box/boxstorage.cpp index 401ec6a115..c2c4c6278e 100644 --- a/backends/cloud/box/boxstorage.cpp +++ b/backends/cloud/box/boxstorage.cpp @@ -115,8 +115,8 @@ void BoxStorage::tokenRefreshed(BoolCallback callback, Networking::JsonResponse Common::JSONObject result = json->asObject(); if (!result.contains("access_token") || !result.contains("refresh_token")) { - warning("Bad response, no token passed"); - debug("%s", json->stringify().c_str()); + warning("BoxStorage: bad response, no token passed"); + debug(9, "%s", json->stringify().c_str()); if (callback) (*callback)(BoolResponse(nullptr, false)); } else { @@ -141,8 +141,8 @@ void BoxStorage::codeFlowComplete(BoolResponse response) { } void BoxStorage::codeFlowFailed(Networking::ErrorResponse error) { - debug("Box's code flow failed (%s, %ld):", (error.failed ? "failed" : "interrupted"), error.httpResponseCode); - debug("%s", error.response.c_str()); + debug(9, "BoxStorage: code flow failed (%s, %ld):", (error.failed ? "failed" : "interrupted"), error.httpResponseCode); + debug(9, "%s", error.response.c_str()); CloudMan.removeStorage(this); } @@ -158,7 +158,7 @@ Common::String BoxStorage::name() const { void BoxStorage::infoInnerCallback(StorageInfoCallback outerCallback, Networking::JsonResponse response) { Common::JSONValue *json = response.value; if (!json) { - warning("NULL passed instead of JSON"); + warning("BoxStorage::infoInnerCallback: NULL passed instead of JSON"); delete outerCallback; return; } @@ -210,7 +210,7 @@ Networking::Request *BoxStorage::listDirectoryById(Common::String id, ListDirect void BoxStorage::createDirectoryInnerCallback(BoolCallback outerCallback, Networking::JsonResponse response) { Common::JSONValue *json = response.value; if (!json) { - warning("NULL passed instead of JSON"); + warning("BoxStorage::createDirectoryInnerCallback: NULL passed instead of JSON"); delete outerCallback; return; } @@ -292,12 +292,12 @@ BoxStorage *BoxStorage::loadFromConfig(Common::String keyPrefix) { loadKeyAndSecret(); if (!ConfMan.hasKey(keyPrefix + "access_token", ConfMan.kCloudDomain)) { - warning("No access_token found"); + warning("BoxStorage: no access_token found"); return nullptr; } if (!ConfMan.hasKey(keyPrefix + "refresh_token", ConfMan.kCloudDomain)) { - warning("No refresh_token found"); + warning("BoxStorage: no refresh_token found"); return nullptr; } |