Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolse committed Dec 27, 2023
1 parent 90ffaae commit 44e5563
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
11 changes: 9 additions & 2 deletions bvm/ManagerStd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "ManagerStd.h"
#include "../core/serialization_adapters.h"
#include "utility/logger.h"

namespace beam {
namespace bvm2 {
Expand Down Expand Up @@ -520,11 +521,14 @@ namespace bvm2 {

if (m_EnforceDependent)
EnsureContext();

LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
CallMethod(iMethod);
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
RunSync();
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
}
catch (const std::exception& exc) {
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]" ;
OnDone(&exc);
}
}
Expand Down Expand Up @@ -582,11 +586,14 @@ namespace bvm2 {
{
while (!IsDone())
{
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
if (IsSuspended())
return;

LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
RunOnce();
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
}
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
OnDone(nullptr);
}

Expand Down
14 changes: 7 additions & 7 deletions wallet/core/contracts/shaders_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,14 @@ namespace beam::wallet {
{
return;
}

LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
const auto& req = _queue.top();
if (!req.shader.empty())
{
try
{
compileAppShader(req.shader);
LOG_DEBUG() << __FUNCTION__ << "[" << __LINE__ << "] shader compiled";
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "] shader compiled";
}
catch(std::exception& ex)
{
Expand All @@ -295,7 +295,7 @@ namespace beam::wallet {
}

m_Args.clear();
LOG_DEBUG() << __FUNCTION__ << "[" << __LINE__ << "] args: " << req.args;
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "] args: " << req.args;
if (!req.args.empty())
{
AddArgs(req.args);
Expand All @@ -307,15 +307,15 @@ namespace beam::wallet {
{
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "] starting..." ;
StartRun(method);
LOG_DEBUG() << __FUNCTION__ << "[" << __LINE__ << "] completed";
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "] completed";
});

m_Wallet.DoInSyncedWallet([wp = std::weak_ptr(_startEvent)]()
{
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "] ";
if (auto sp = wp.lock())
{
LOG_DEBUG() << __FUNCTION__ << "[" << __LINE__ << "] posting event";
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "] posting event";
sp->post();
}
});
Expand Down Expand Up @@ -380,7 +380,7 @@ namespace beam::wallet {
LOG_WARNING() << "Queue has been cleared before request completed";
return;
}
LOG_DEBUG() << __FUNCTION__ << "[" << __LINE__ << "]" << ": _queue.pop()";
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]" << ": _queue.pop()";
BOOST_SCOPE_EXIT_ALL(&, this) {
_queue.pop();
this->nextRequest();
Expand Down Expand Up @@ -415,7 +415,7 @@ namespace beam::wallet {
boost::optional<std::string> result = m_Out.str();
if (_logResult)
{
LOG_VERBOSE () << "Shader result: " << std::string_view(result ? *result : std::string()).substr(0, 200);
LOG_INFO () << "Shader result: " << std::string_view(result ? *result : std::string()).substr(0, 200);
}

if (m_InvokeData.m_vec.empty())
Expand Down

0 comments on commit 44e5563

Please sign in to comment.