Skip to content

Commit

Permalink
fix(logging): update public apis (#12898)
Browse files Browse the repository at this point in the history
Co-authored-by: Ashwin Kumar <[email protected]>
  • Loading branch information
ashwinkumar6 and Ashwin Kumar authored Jan 26, 2024
1 parent 6daf53b commit 5526225
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 48 deletions.
4 changes: 2 additions & 2 deletions packages/aws-amplify/__tests__/exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ describe('aws-amplify Exports', () => {
describe('Logging exports', () => {
it('should only export expected symbols from the top-level', () => {
expect(Object.keys(loggingTopLevelExports).sort()).toEqual(
['disable', 'enable', 'flushLogs', 'createLogger'].sort()
['disable', 'enable', 'flushLogs', 'createLogger', 'configure'].sort()
);
});

it('should only export expected symbols from the Cloudwatch provider', () => {
expect(Object.keys(loggingCloudwatchExports).sort()).toEqual(
['disable', 'enable', 'getProvider'].sort()
['flushLogs', 'createLogger', 'configure'].sort()
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/logging/__tests__/apis/disable.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { disable } from '../../src/apis';
import { disable } from '../../src';

// TODO: pending implementation
describe('Logging APIs: disable', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/logging/__tests__/apis/enable.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { enable } from '../../src/apis';
import { enable } from '../../src';

// TODO: pending implementation
describe('Logging APIs: enable', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { getProvider } from '../../../../src/providers/cloudwatch';
import { configure } from '../../../../src';

// TODO: pending implementation
describe('Cloudwatch provider APIs: getCloudWatchProvider', () => {
it('should get cloudWatchProvider', () => {
const cloudWatchProvider = getProvider({});
configure();
});
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { createLogger } from '../../src/apis';
import { createLogger } from '../../../../src';

// TODO: pending implementation
describe('Logging APIs: generateLogger', () => {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { flushLogs } from '../../src/apis';
import { flushLogs } from '../../../../src';

// TODO: pending implementation
describe('Logging APIs: flushLogs', () => {
Expand Down
2 changes: 0 additions & 2 deletions packages/logging/src/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@

export { enable } from './enable';
export { disable } from './disable';
export { flushLogs } from './flushLogs';
export { createLogger } from './createLogger';
3 changes: 2 additions & 1 deletion packages/logging/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

export { enable, disable, flushLogs, createLogger } from './apis';
export { enable, disable } from './apis';
export { configure, createLogger, flushLogs } from './providers/cloudwatch';
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// SPDX-License-Identifier: Apache-2.0

// TODO: pending implementation
export const enable = (): void => {};
export const configure = (): any => {};
File renamed without changes.
5 changes: 0 additions & 5 deletions packages/logging/src/providers/cloudwatch/apis/disable.ts

This file was deleted.

File renamed without changes.
5 changes: 0 additions & 5 deletions packages/logging/src/providers/cloudwatch/apis/getProvider.ts

This file was deleted.

6 changes: 3 additions & 3 deletions packages/logging/src/providers/cloudwatch/apis/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

export { enable } from './enable';
export { disable } from './disable';
export { getProvider } from './getProvider';
export { configure } from './configure';
export { createLogger } from './createLogger';
export { flushLogs } from './flushLogs';
2 changes: 1 addition & 1 deletion packages/logging/src/providers/cloudwatch/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

export { enable, disable, getProvider } from './apis';
export { configure, createLogger, flushLogs } from './apis';

0 comments on commit 5526225

Please sign in to comment.