Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logging): update public apis #12898

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -261,7 +261,7 @@ 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()
);
});

Expand All @@ -273,7 +273,7 @@ describe('aws-amplify Exports', () => {

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', () => {
Comment on lines 7 to 8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Doesn't need to be addressed yet since these are more or less just placeholders at this time but I think the test descriptions are out of date

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh yes, will take note to update these test names
thanks

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 => {};
5 changes: 0 additions & 5 deletions packages/logging/src/providers/cloudwatch/apis/disable.ts

This file was deleted.

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';
Loading