浏览代码

refactor: console.log -> log.warn

sschmid 4 年之前
父节点
当前提交
6c5e729418
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts

+ 2 - 2
src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts

@@ -289,7 +289,7 @@ export class OpenSheetMusicDisplay {
             const backend: VexFlowBackend = this.createBackend(this.backendType, page);
             const sizeWarningPartTwo: string = " exceeds CanvasBackend limit of 32767. Cutting off score.";
             if (backend.getOSMDBackendType() === BackendType.Canvas && width > canvasDimensionsLimit) {
-                console.log("[OSMD] Warning: width of " + width + sizeWarningPartTwo);
+                log.warn("[OSMD] Warning: width of " + width + sizeWarningPartTwo);
                 width = canvasDimensionsLimit;
             }
             if (this.rules.PageFormat && !this.rules.PageFormat.IsUndefined) {
@@ -306,7 +306,7 @@ export class OpenSheetMusicDisplay {
                 // console.log("pageformat not given. height: " + page.PositionAndShape.Size.height);
             }
             if (backend.getOSMDBackendType() === BackendType.Canvas && height > canvasDimensionsLimit) {
-                console.log("[OSMD] Warning: height of " + height + sizeWarningPartTwo);
+                log.warn("[OSMD] Warning: height of " + height + sizeWarningPartTwo);
                 height = Math.min(height, canvasDimensionsLimit); // this cuts off the the score, but doesn't break rendering.
                 // TODO optional: reduce zoom to fit the score within the limit.
             }