Skip to content

Commit

Permalink
fix(logging): rename core logger dir to logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwin Kumar committed Jan 25, 2024
1 parent 63bb644 commit 17c587e
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/core/__tests__/Cache/StorageCacheCommon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CacheConfig } from '../../src/Cache/types';
import { defaultConfig } from '../../src/Cache/constants';
import { StorageCacheCommon } from '../../src/Cache/StorageCacheCommon';
import { KeyValueStorageInterface } from '../../src/types';
import { ConsoleLogger } from '../../src/logger';
import { ConsoleLogger } from '../../src/logging';
import {
getByteLength,
getCurrentSizeKey,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/__tests__/ConsoleLogger.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ConsoleLogger } from '../src';
import { LoggingProvider } from '../src/logger/types';
import { LoggingProvider } from '../src/logging/types';

describe('ConsoleLogger', () => {
describe('pluggables', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/__tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '../src/utils';
import { Reachability as ReachabilityNative } from '../src/Reachability/Reachability.native';
import { Reachability } from '../src/Reachability/Reachability';
import { ConsoleLogger } from '../src/logger';
import { ConsoleLogger } from '../src/logging';
import { DateUtils } from '../src/Signer/DateUtils';

ConsoleLogger.LOG_LEVEL = 'DEBUG';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Cache/StorageCache.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { loadAsyncStorage } from '@aws-amplify/react-native';
import { ConsoleLogger } from '../logger';
import { ConsoleLogger } from '../logging';
import { defaultConfig } from './constants';
import { StorageCacheCommon } from './StorageCacheCommon';
import { Cache, CacheConfig } from './types';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Cache/StorageCache.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 { ConsoleLogger } from '../logger';
import { ConsoleLogger } from '../logging';
import { KeyValueStorage } from '../storage/KeyValueStorage';
import { getLocalStorageWithFallback } from '../storage/utils';
import { defaultConfig } from './constants';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Cache/StorageCacheCommon.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 { ConsoleLogger } from '../logger';
import { ConsoleLogger } from '../logging';
import { KeyValueStorageInterface } from '../types';
import { currentSizeKey, defaultConfig } from './constants';
import { CacheConfig, CacheItem, CacheItemOptions } from './types';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Hub/index.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 { ConsoleLogger } from '../logger';
import { ConsoleLogger } from '../logging';
import { NO_HUBCALLBACK_PROVIDED_EXCEPTION } from '../constants';
import { AmplifyError } from '../errors';
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/I18n/I18n.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 { ConsoleLogger } from '../logger';
import { ConsoleLogger } from '../logging';
import { I18nConfig } from './types';

const logger = new ConsoleLogger('I18n');
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/I18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { I18n as I18nClass } from './I18n';

import { ConsoleLogger } from '../logger';
import { ConsoleLogger } from '../logging';
import { I18nConfig } from './types';
import { assert, I18nErrorCode } from './errorHelpers';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Reachability/Reachability.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import { Observable } from 'rxjs';
import { loadNetInfo } from '@aws-amplify/react-native';
import { ConsoleLogger } from '../logger';
import { ConsoleLogger } from '../logging';
import { NetworkStatus } from './types';

const logger = new ConsoleLogger('Reachability', 'DEBUG');
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/ServiceWorker/ServiceWorker.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 { ConsoleLogger } from '../logger';
import { ConsoleLogger } from '../logging';
import { isBrowser } from '../utils';
import { AmplifyError } from '../errors';
import { assert, ServiceWorkerErrorCode } from './errorHelpers';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export { CacheConfig } from './Cache/types';
export { I18n } from './I18n';

// Logging utilities
export { ConsoleLogger } from './logger';
export { ConsoleLogger } from './logging';

// Service worker
export { ServiceWorker } from './ServiceWorker';
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions packages/core/src/parseAWSExports.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
import { ConsoleLogger } from './logger';
import { ConsoleLogger } from './logging';
import { AmplifyError } from './errors';
import {
AuthConfigUserAttributes,
Expand Down Expand Up @@ -147,7 +147,7 @@ export const parseAWSExports = (
aws_cognito_mfa_configuration.toLowerCase(),
totpEnabled: aws_cognito_mfa_types?.includes('TOTP') ?? false,
smsEnabled: aws_cognito_mfa_types?.includes('SMS') ?? false,
}
}
: undefined;
const passwordFormatConfig = aws_cognito_password_protection_settings
? {
Expand All @@ -169,7 +169,7 @@ export const parseAWSExports = (
aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes(
'REQUIRES_SYMBOLS'
) ?? false,
}
}
: undefined;
const mergedUserAttributes: LegacyUserAttributeKey[] = Array.from(
new Set([
Expand Down Expand Up @@ -250,7 +250,7 @@ export const parseAWSExports = (
searchIndices: amazon_location_service.search_indices,
region: amazon_location_service.region,
},
}
}
: { ...geo };
}

Expand Down Expand Up @@ -290,7 +290,7 @@ export const parseAWSExports = (
defaults: { voiceId },
},
},
}
}
: predictions;
}

Expand Down
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 { ConsoleLogger } from '../../../logger';
import { ConsoleLogger } from '../../../logging';
import {
EventsBatch,
putEvents,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// @ts-ignore: missing type definition
import { Platform, Dimensions } from 'react-native';
import { ConsoleLogger } from '../../logger';
import { ConsoleLogger } from '../../logging';

const logger = new ConsoleLogger('getClientInfo');

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/getClientInfo/getClientInfo.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// @ts-ignore: missing type definition
import { Platform, Dimensions } from 'react-native';
import { ConsoleLogger } from '../../logger';
import { ConsoleLogger } from '../../logging';

const logger = new ConsoleLogger('getClientInfo');

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/getClientInfo/getClientInfo.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
import { ConsoleLogger } from '../../logger';
import { ConsoleLogger } from '../../logging';

const logger = new ConsoleLogger('getClientInfo');

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/retry/retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { DelayFunction } from '../../types';
import { ConsoleLogger } from '../../logger/ConsoleLogger';
import { ConsoleLogger } from '../../logging/ConsoleLogger';
import { isNonRetryableError } from './isNonRetryableError';

const logger = new ConsoleLogger('retryUtil');
Expand Down

0 comments on commit 17c587e

Please sign in to comment.