Skip to content

Commit

Permalink
added info logs for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshGandhi-AWS committed Sep 30, 2023
1 parent 129f662 commit 6d022ad
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ jobs:
- name: Archive ST Ubuntu aarch64 Build Artifact
uses: actions/upload-artifact@v2
# Run for main branch only
if: github.ref == 'refs/heads/main'
if: github.ref != 'refs/heads/main'
with:
name: "ST.ubuntu.x64.${{ env.PACKAGE_NAME }}"
path: |
Expand Down Expand Up @@ -445,7 +445,7 @@ jobs:
- name: Archive ST Ubuntu aarch64 Build Artifact
uses: actions/upload-artifact@v2
# Run for main branch only
if: github.ref == 'refs/heads/main'
if: github.ref != 'refs/heads/main'
with:
name: "ST.ubuntu.aarch64.${{ env.PACKAGE_NAME }}"
path: |
Expand Down Expand Up @@ -477,7 +477,7 @@ jobs:
- name: Archive st armhf32 Build Artifact
uses: actions/upload-artifact@v2
# Run for main branch only
if: github.ref == 'refs/heads/main'
if: github.ref != 'refs/heads/main'
with:
name: "ST.linux.armhf.${{ env.PACKAGE_NAME }}"
path: |
Expand Down
4 changes: 2 additions & 2 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ bool init(int argc, char *argv[])
*/
void shutdown()
{
LOG_DEBUG(TAG, "Inside of shutdown()");
LOG_INFO(TAG, "Inside of shutdown()");
if (!attemptingShutdown && features->getSize() != 0)
{
attemptingShutdown = true;

LOG_DEBUG(TAG, "Calling stop all");
LOG_INFO(TAG, "Calling stop all");
features->stopAll();
}
resourceManager->dumpMemTrace();
Expand Down
18 changes: 9 additions & 9 deletions source/tunneling/SecureTunnelingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,18 @@ namespace Aws

void SecureTunnelingContext::OnConnectionComplete() const
{
LOG_DEBUG(TAG, "SecureTunnelingContext::OnConnectionComplete");
LOG_INFO(TAG, "SecureTunnelingContext::OnConnectionComplete");
}

void SecureTunnelingContext::OnConnectionShutdown()
{
LOG_DEBUG(TAG, "SecureTunnelingContext::OnConnectionShutdown");
LOG_INFO(TAG, "SecureTunnelingContext::OnConnectionShutdown");
mOnConnectionShutdown(this);
}

void SecureTunnelingContext::OnSendDataComplete(int errorCode) const
{
LOG_DEBUG(TAG, "SecureTunnelingContext::OnSendDataComplete");
LOG_INFO(TAG, "SecureTunnelingContext::OnSendDataComplete");
if (errorCode)
{
LOGM_ERROR(TAG, "SecureTunnelingContext::OnSendDataComplete errorCode=%d", errorCode);
Expand All @@ -148,37 +148,37 @@ namespace Aws

void SecureTunnelingContext::OnDataReceive(const Crt::ByteBuf &data) const
{
LOGM_DEBUG(TAG, "SecureTunnelingContext::OnDataReceive data.len=%zu", data.len);
LOGM_INFO(TAG, "SecureTunnelingContext::OnDataReceive data.len=%zu", data.len);
mTcpForward->SendData(aws_byte_cursor_from_buf(&data));
}

void SecureTunnelingContext::OnStreamStart()
{
LOG_DEBUG(TAG, "SecureTunnelingContext::OnStreamStart");
LOG_INFO(TAG, "SecureTunnelingContext::OnStreamStart");
ConnectToTcpForward();
}

void SecureTunnelingContext::OnStreamReset()
{
LOG_DEBUG(TAG, "SecureTunnelingContext::OnStreamReset");
LOG_INFO(TAG, "SecureTunnelingContext::OnStreamReset");
DisconnectFromTcpForward();
}

void SecureTunnelingContext::OnSessionReset()
{
LOG_DEBUG(TAG, "SecureTunnelingContext::OnSessionReset");
LOG_INFO(TAG, "SecureTunnelingContext::OnSessionReset");
DisconnectFromTcpForward();
}

void SecureTunnelingContext::OnTcpForwardDataReceive(const Crt::ByteBuf &data) const
{
LOGM_DEBUG(TAG, "SecureTunnelingContext::OnTcpForwardDataReceive data.len=%zu", data.len);
LOGM_INFO(TAG, "SecureTunnelingContext::OnTcpForwardDataReceive data.len=%zu", data.len);
mSecureTunnel->SendData(aws_byte_cursor_from_buf(&data));
}

void SecureTunnelingContext::StopSecureTunnel()
{
LOG_DEBUG(TAG, "SecureTunnelingContext::StopSecureTunnel");
LOG_INFO(TAG, "SecureTunnelingContext::StopSecureTunnel");
mSecureTunnel->Shutdown();
}

Expand Down
10 changes: 5 additions & 5 deletions source/tunneling/SecureTunnelingFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace Aws

int SecureTunnelingFeature::stop()
{
LOG_DEBUG(TAG, "SecureTunnelingFeature::stop");
LOG_INFO(TAG, "SecureTunnelingFeature::stop");
for (auto &c : mContexts)
{
c->StopSecureTunnel();
Expand Down Expand Up @@ -146,7 +146,7 @@ namespace Aws
SecureTunnelingNotifyResponse *response,
int ioErr)
{
LOG_DEBUG(TAG, "Received MQTT Tunnel Notification");
LOG_INFO(TAG, "Received MQTT Tunnel Notification");

if (ioErr || !response)
{
Expand Down Expand Up @@ -206,7 +206,7 @@ namespace Aws
return;
}

LOGM_DEBUG(TAG, "Region=%s, Service=%s", region.c_str(), service.c_str());
LOGM_INFO(TAG, "Region=%s, Service=%s", region.c_str(), service.c_str());

auto context = createContext(accessToken, region, port);

Expand All @@ -218,7 +218,7 @@ namespace Aws

void SecureTunnelingFeature::OnSubscribeComplete(int ioErr) const
{
LOG_DEBUG(TAG, "Subscribed to tunnel notification topic");
LOG_INFO(TAG, "Subscribed to tunnel notification topic");

if (ioErr)
{
Expand Down Expand Up @@ -271,7 +271,7 @@ namespace Aws

void SecureTunnelingFeature::OnConnectionShutdown(SecureTunnelingContext *contextToRemove)
{
LOG_DEBUG(TAG, "SecureTunnelingFeature::OnConnectionShutdown");
LOG_INFO(TAG, "SecureTunnelingFeature::OnConnectionShutdown");
#if defined(DISABLE_MQTT)
this->stop();
#else
Expand Down

0 comments on commit 6d022ad

Please sign in to comment.