Skip to content

Commit c9583f9

Browse files
committed
Use Trace.write for warnings to align with tracing system
1 parent 051f60d commit c9583f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/image-asset/image-asset-common.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ImageAsset as ImageAssetDefinition, ImageAssetOptions } from '.';
22
import { Observable } from '../data/observable';
33
import { Screen } from '../platform';
4+
import { Trace } from '../trace/index';
45

56
export class ImageAssetBase extends Observable implements ImageAssetDefinition {
67
private _options: ImageAssetOptions;
@@ -54,7 +55,7 @@ export function getRequestedImageSize(src: { width: number; height: number }, op
5455
if (!isNaN(parsedWidth)) {
5556
optionsCopy.width = parsedWidth;
5657
} else {
57-
console.warn('Invalid width value provided: ', optionsCopy.width);
58+
Trace.write('Invalid width value provided: ' + optionsCopy.width, Trace.categories.Debug, Trace.messageType.warn);
5859
delete optionsCopy.width;
5960
}
6061
}
@@ -64,7 +65,7 @@ export function getRequestedImageSize(src: { width: number; height: number }, op
6465
if (!isNaN(parsedHeight)) {
6566
optionsCopy.height = parsedHeight;
6667
} else {
67-
console.warn('Invalid height value provided: ', options.height);
68+
Trace.write('Invalid height value provided: ' + optionsCopy.height, Trace.categories.Debug, Trace.messageType.warn);
6869
delete optionsCopy.height;
6970
}
7071
}

0 commit comments

Comments
 (0)