Skip to content

Commit

Permalink
log client configs
Browse files Browse the repository at this point in the history
  • Loading branch information
balanza committed Jul 28, 2022
1 parent 96f53b0 commit d105e4b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/utils/access_log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as O from "fp-ts/lib/Option";
import * as TE from "fp-ts/lib/TaskEither";
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
import { SpidBlobItem, SpidLogMsg } from "../types/access_log";
import { logger } from "../utils/logger";
import { upsertBlobFromObject } from "./blob";
import { SpidLogsStorageConfiguration } from "./config";

Expand Down Expand Up @@ -150,12 +151,14 @@ export const createAccessLogWriter = (
storageConfig.SPID_LOGS_STORAGE_CONTAINER_NAME
);
} else if (storageConfig.SPID_LOGS_STORAGE_KIND === "awss3") {
const client = new S3Client({
// endpoint: storageConfig.SPID_LOGS_STORAGE_ENDPOINT,
forcePathStyle: true
// region: storageConfig.SPID_LOGS_STORAGE_CONTAINER_REGION
});
logger.info(`S3 CLIENT CONFIG=${JSON.stringify(client.config)}`);
return createAwsS3AccessLogWriter(
new S3Client({
endpoint: storageConfig.SPID_LOGS_STORAGE_ENDPOINT,
forcePathStyle: true,
region: storageConfig.SPID_LOGS_STORAGE_CONTAINER_REGION
}),
client,
storageConfig.SPID_LOGS_STORAGE_CONTAINER_NAME
);
} else {
Expand Down

0 comments on commit d105e4b

Please sign in to comment.