Skip to content

Commit

Permalink
Turned on console logging/tracing.
Browse files Browse the repository at this point in the history
  • Loading branch information
WardF committed Sep 7, 2023
1 parent 99e8ff3 commit adfeec0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/ncs3sdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#ifndef NCS3SDK_H
#define NCS3SDK_H 1


typedef struct NCS3INFO {
char* host; /* non-null if other*/
char* region; /* region */
Expand Down
1 change: 1 addition & 0 deletions libdispatch/awsincludes.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <aws/core/utils/logging/DefaultLogSystem.h>
#include <aws/core/utils/logging/AWSLogging.h>
#include <aws/core/Version.h>
#include <aws/core/utils/logging/ConsoleLogSystem.h>
#include <ios>
#include <iostream>
#include <fstream>
Expand Down
7 changes: 6 additions & 1 deletion libdispatch/ncs3sdk_aws.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#define NOOP
#define DEBUG



#include "awsincludes.h"
#include <stdlib.h>
#include <string.h>
Expand Down Expand Up @@ -112,8 +114,11 @@ NC_s3sdkinitialize(void)
if(!ncs3_initialized) {
ncs3_initialized = 1;
ncs3_finalized = 0;
NCTRACE(11,NULL);

ncs3options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
ncs3options.loggingOptions.logger_create_fn = [] { return std::make_shared<Aws::Utils::Logging::ConsoleLogSystem>(Aws::Utils::Logging::LogLevel::Trace); };
Aws::InitAPI(ncs3options);

#ifdef DEBUG
ncs3options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Debug;
#endif
Expand Down

0 comments on commit adfeec0

Please sign in to comment.