Skip to content

Commit e337d4a

Browse files
committed
Clean up console calls
Remove log and info calls or convert them to other calls. Clean up some messages.
1 parent c336053 commit e337d4a

File tree

10 files changed

+9
-17
lines changed

10 files changed

+9
-17
lines changed

packages/base/src/commands/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,6 @@ export function addCommands(
740740
if (!currentWidget || !completionProviderManager) {
741741
return;
742742
}
743-
console.log('zooming');
744743
const model = tracker.currentWidget.model;
745744
const selectedItems = model.localState?.selected.value;
746745

@@ -961,7 +960,7 @@ namespace Private {
961960
const selected = model?.localState?.selected?.value;
962961

963962
if (!selected) {
964-
console.info('Nothing selected');
963+
console.error('Failed to remove selected item -- nothing selected');
965964
return;
966965
}
967966

packages/base/src/dialogs/symbology/vector_layer/types/Categorized.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ const Categorized: React.FC<ISymbologyTabbedDialogWithAttributesProps> = ({
203203
const newStyle = { ...layer.parameters.color };
204204

205205
if (method === 'color') {
206-
console.log('delecol');
207-
208206
delete newStyle['fill-color'];
209207
delete newStyle['stroke-color'];
210208
delete newStyle['circle-fill-color'];

packages/base/src/mainview/mainView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@ export class MainView extends React.Component<IProps, IStates> {
21102110
const olLayer = this.getLayer(layerId);
21112111

21122112
if (!jgisLayer || !olLayer) {
2113-
console.log('Layer not found');
2113+
console.error('Failed to update layer -- layer not found');
21142114
return;
21152115
}
21162116

packages/base/src/stacBrowser/hooks/useStacSearch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function useStacSearch({ model }: IUseStacSearchProps): IUseStacSearchReturn {
209209
)) as IStacSearchResult;
210210

211211
if (!data) {
212-
console.log('No Results found');
212+
console.debug('STAC search failed -- no results found');
213213
setResults([]);
214214
setTotalPages(1);
215215
setTotalResults(0);
@@ -221,7 +221,7 @@ function useStacSearch({ model }: IUseStacSearchProps): IUseStacSearchReturn {
221221
setTotalPages(Math.ceil(pages));
222222
setTotalResults(data.context.matched);
223223
} catch (error) {
224-
console.error('Error fetching data:', error);
224+
console.error('STAC search failed -- error fetching data:', error);
225225
setResults([]);
226226
setTotalPages(1);
227227
setTotalResults(0);

packages/base/src/tools.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ export async function requestAPI<T>(
111111
try {
112112
data = JSON.parse(data);
113113
} catch (error) {
114-
console.log('Not a JSON response body.', response);
114+
console.error(
115+
'Jupyter API request failed -- not a JSON response body:',
116+
response,
117+
);
115118
}
116119
}
117120

packages/schema/src/model.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ export class JupyterGISModel implements IJupyterGISModel {
6969

7070
setting.changed.connect(() => {
7171
this._settings = setting.composite as any;
72-
console.log('JupyterGIS Settings updated:', this._settings);
7372
});
7473
}
7574
}
@@ -628,7 +627,7 @@ export class JupyterGISModel implements IJupyterGISModel {
628627
layerTreeInfo.mainGroup,
629628
);
630629
} else {
631-
console.log('Something went wrong when renaming layer');
630+
console.error('Layer group rename failed -- could not get layer tree.');
632631
}
633632
}
634633

python/jupytergis_core/src/jgisplugin/plugins.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ const activate = async (
6565

6666
try {
6767
settings = await settingRegistry.load(SETTINGS_ID);
68-
console.log(`Loaded settings for ${SETTINGS_ID}`, settings);
6968
} catch (error) {
7069
console.warn(`Failed to load settings for ${SETTINGS_ID}`, error);
7170
}

python/jupytergis_core/src/plugin.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export const trackerPlugin: JupyterFrontEndPlugin<IJupyterGISTracker> = {
4141
const tracker = new WidgetTracker<IJupyterGISWidget>({
4242
namespace: NAME_SPACE,
4343
});
44-
console.log('jupytergis:core:tracker is activated!');
4544
return tracker;
4645
},
4746
};
@@ -80,8 +79,6 @@ export const layerBrowserRegistryPlugin: JupyterFrontEndPlugin<IJGISLayerBrowser
8079
requires: [],
8180
provides: IJGISLayerBrowserRegistryToken,
8281
activate: (app: JupyterFrontEnd) => {
83-
console.log('jupytergis:core:layer-browser-registry is activated');
84-
8582
const registry = new JupyterGISLayerBrowserRegistry();
8683
return registry;
8784
},

python/jupytergis_lab/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ const plugin: JupyterFrontEndPlugin<void> = {
5959
translator?: ITranslator,
6060
completionProviderManager?: ICompletionProviderManager,
6161
): void => {
62-
console.log('jupytergis:lab:main-menu is activated!');
6362
translator = translator ?? nullTranslator;
6463
const isEnabled = (): boolean => {
6564
return (

python/jupytergis_qgis/src/plugins.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,6 @@ const activate = async (
302302
});
303303
}
304304
}
305-
306-
console.log('@jupytergis/jupytergis-qgis:qgisplugin is activated!');
307305
};
308306

309307
export const qgisplugin: JupyterFrontEndPlugin<void> = {

0 commit comments

Comments
 (0)