8000 [FSSDK-9588] export logging types and values (#858) · optimizely/javascript-sdk@b1ef5b0 · GitHub
[go: up one dir, main page]

Skip to content

Commit b1ef5b0

Browse files
authored
[FSSDK-9588] export logging types and values (#858)
1 parent 9ff2887 commit b1ef5b0

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

lib/common_exports.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright 2023 Optimizely
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
export { LogLevel, LogHandler, getLogger, setLogHandler } from './modules/logging';
18+
export { LOG_LEVEL } from './utils/enums';
19+
export { createLogger } from './plugins/logger';

lib/index.browser.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { BrowserOdpManager } from './plugins/odp_manager/index.browser';
3030
import Optimizely from './optimizely';
3131
import { IUserAgentParser } from './core/odp/user_agent_parser';
3232
import { getUserAgentParser } from './plugins/odp/user_agent_parser/index.browser';
33+
import * as commonExports from './common_exports';
3334

3435
const logger = getLogger();
3536
logHelper.setLogHandler(loggerPlugin.createLogger());
@@ -181,7 +182,10 @@ export {
181182
getUserAgentParser,
182183
};
183184

185+
export * from './common_exports';
186+
184187
export default {
188+
...commonExports,
185189
logging: loggerPlugin,
186190
errorHandler: defaultErrorHandler,
187191
eventDispatcher: defaultEventDispatcher,

lib/index.lite.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { createNotificationCenter } from './core/notification_center';
3131
import { createForwardingEventProcessor } from './plugins/event_processor/forwarding_event_processor';
3232
import { OptimizelyDecideOption, Client, ConfigLite } from './shared_types';
3333
import { createNoOpDatafileManager } from './plugins/datafile_manager/no_op_datafile_manager';
34+
import * as commonExports from './common_exports';
3435

3536
const logger = getLogger();
3637
setLogHandler(loggerPlugin.createLogger());
@@ -102,7 +103,10 @@ export {
102103
OptimizelyDecideOption,
103104
};
104105

106+
export * from './common_exports';
107+
105108
export default {
109+
...commonExports,
106110
logging: loggerPlugin,
107111
errorHandler: defaultErrorHandler,
108112
eventDispatcher: noOpEventDispatcher,

lib/index.node.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { createEventProcessor } from './plugins/event_processor';
2626
import { OptimizelyDecideOption, Client, Config } from './shared_types';
2727
import { createHttpPollingDatafileManager } from './plugins/datafile_manager/http_polling_datafile_manager';
2828
import { NodeOdpManager } from './plugins/odp_manager/index.node';
29+
import * as commonExports from './common_exports';
2930

3031
const logger = getLogger();
3132
setLogLevel(LogLevel.ERROR);
@@ -136,7 +137,10 @@ export {
136137
OptimizelyDecideOption,
137138
};
138139

140+
export * from './common_exports';
141+
139142
export default {
143+
...commonExports,
140144
logging: loggerPlugin,
141145
errorHandler: defaultErrorHandler,
142146
eventDispatcher: defaultEventDispatcher,

lib/index.react_native.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { OptimizelyDecideOption, Client, Config } from './shared_types';
3434
import { createHttpPollingDatafileManager } from
3535
'./plugins/datafile_manager/react_native_http_polling_datafile_manager';
3636
import { BrowserOdpManager } from './plugins/odp_manager/index.browser';
37+
import * as commonExports from './common_exports';
3738

3839
const logger = getLogger();
3940
setLogHandler(loggerPlugin.createLogger());
@@ -142,7 +143,10 @@ export {
142143
OptimizelyDecideOption,
143144
};
144145

146+
export * from './common_exports';
147+
145148
export default {
149+
...commonExports,
146150
logging: loggerPlugin,
147151
errorHandler: defaultErrorHandler,
148152
eventDispatcher: defaultEventDispatcher,

0 commit comments

Comments
 (0)
0