Turned on console logging/tracing.

This commit is contained in:
Ward Fisher 2023-09-07 15:00:05 -06:00
parent 99e8ff31d8
commit adfeec0605
3 changed files with 8 additions and 1 deletions

View File

@ -6,6 +6,7 @@
#ifndef NCS3SDK_H
#define NCS3SDK_H 1
typedef struct NCS3INFO {
char* host; /* non-null if other*/
char* region; /* region */

View File

@ -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>

View File

@ -8,6 +8,8 @@
#define NOOP
#define DEBUG
#include "awsincludes.h"
#include <stdlib.h>
#include <string.h>
@ -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