当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript logger.warn方法代码示例

本文整理汇总了TypeScript中core/logging.logger.warn方法的典型用法代码示例。如果您正苦于以下问题:TypeScript logger.warn方法的具体用法?TypeScript logger.warn怎么用?TypeScript logger.warn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在core/logging.logger的用法示例。


在下文中一共展示了logger.warn方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: compute_indices

 compute_indices(_source): any {
   if ((this.indices != null ? this.indices.length : undefined) >= 0) {
     if (all(this.indices, isInteger)) {
       return this.indices;
     } else {
       logger.warn(`IndexFilter ${this.id}: indices should be array of integers, defaulting to no filtering`);
       return null;
     }
   } else {
     logger.warn(`IndexFilter ${this.id}: indices was not set, defaulting to no filtering`);
     return null;
   }
 }
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:13,代码来源:index_filter.ts

示例2: compute_indices

 compute_indices(source): any {
   const column = source.get_column(this.column_name);
   if ((column == null)) {
     logger.warn("group filter: groupby column not found in data source");
     return null;
   } else {
     this.indices = (range(0, source.get_length()).filter((i) => column[i] === this.group));
     if (this.indices.length === 0) {
       logger.warn(`group filter: group '${this.group}' did not match any values in column '${this.column_name}'`);
     }
     return this.indices;
   }
 }
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:13,代码来源:group_filter.ts

示例3: compute_indices

 compute_indices(_source: DataSource): number[] | null {
   if (this.indices != null && this.indices.length >= 0) {
     if (all(this.indices, isInteger))
       return this.indices
     else {
       logger.warn(`IndexFilter ${this.id}: indices should be array of integers, defaulting to no filtering`)
       return null
     }
   } else {
     logger.warn(`IndexFilter ${this.id}: indices was not set, defaulting to no filtering`)
     return null
   }
 }
开发者ID:Zyell,项目名称:bokeh,代码行数:13,代码来源:index_filter.ts

示例4: compute_indices

 compute_indices(_source): any {
   if ((this.filter != null ? this.filter.length : undefined) >= 0) {
     if (all(this.filter, isBoolean)) {
       return (range(0, this.filter.length).filter((i) => this.filter[i] === true));
     } else if (all(this.filter, isInteger)) {
       return this.filter;
     } else {
       logger.warn(`Filter ${this.id}: filter should either be array of only booleans or only integers, defaulting to no filtering`);
       return null;
     }
   } else {
     logger.warn(`Filter ${this.id}: filter was not set to be an array, defaulting to no filtering`);
     return null;
   }
 }
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:15,代码来源:filter.ts

示例5: compute_indices

 compute_indices(_source: DataSource): number[] | null {
   const filter = this.filter
   if (filter != null && filter.length >= 0) {
     if (isArrayOf(filter, isBoolean)) {
       return range(0, filter.length).filter((i) => filter[i] === true)
     }
     if (isArrayOf(filter, isInteger)) {
       return filter
     }
     logger.warn(`Filter ${this.id}: filter should either be array of only booleans or only integers, defaulting to no filtering`)
     return null
   } else {
     logger.warn(`Filter ${this.id}: filter was not set to be an array, defaulting to no filtering`)
     return null
   }
 }
开发者ID:Zyell,项目名称:bokeh,代码行数:16,代码来源:filter.ts

示例6: _init_tools

  _init_tools() {
    for (const tool of this.tools) {
      if (tool instanceof InspectTool) {
        if (!any(this.inspectors, t => t.id === tool.id))
          this.inspectors = this.inspectors.concat([tool]);
      } else if (tool instanceof HelpTool) {
        if (!any(this.help, t => t.id === tool.id))
          this.help = this.help.concat([tool]);
      } else if (tool instanceof ActionTool) {
        if (!any(this.actions, t => t.id === tool.id))
          this.actions = this.actions.concat([tool]);
      } else if (tool instanceof GestureTool) {
        let event_types = tool.event_type
        let multi = true
        if (typeof event_types === "string") {
          event_types = [event_types]
          multi = false
        }

        for (let et of event_types) {
          if (!(et in this.gestures)) {
            logger.warn(`Toolbar: unknown event type '${et}' for tool: ${tool.type} (${tool.id})`)
            continue
          }

          if (multi)
            et = "multi"

          if (!any(this.gestures[et].tools, t => t.id === tool.id))
            this.gestures[et].tools = this.gestures[et].tools.concat([tool]);
        }
      }
    }
  }
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:34,代码来源:toolbar_box.ts

示例7: initialize

 initialize(): void {
   super.initialize();
   this.basic_formatter = new BasicTickFormatter();
   if ((this.ticker == null)) {
     logger.warn("LogTickFormatter not configured with a ticker, using default base of 10 (labels will be incorrect if ticker base is not 10)");
   }
 }
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:7,代码来源:log_tick_formatter.ts

示例8: set_initial_range

 set_initial_range(): void {
   // check for good values for ranges before setting initial range
   let good_vals = true
   const {x_ranges, y_ranges} = this.frame
   const xrs: {[key: string]: Interval} = {}
   const yrs: {[key: string]: Interval} = {}
   for (const name in x_ranges) {
     const {start, end} = x_ranges[name]
     if (start == null || end == null || isStrictNaN(start + end)) {
       good_vals = false
       break
     }
     xrs[name] = {start, end}
   }
   if (good_vals) {
     for (const name in y_ranges) {
       const {start, end} = y_ranges[name]
       if (start == null || end == null || isStrictNaN(start + end)) {
         good_vals = false
         break
       }
       yrs[name] = {start, end}
     }
   }
   if (good_vals) {
     this._initial_state_info.range = {xrs, yrs}
     logger.debug("initial ranges set")
   } else
     logger.warn('could not set initial ranges')
 }
开发者ID:gully,项目名称:bokeh,代码行数:30,代码来源:plot_canvas.ts

示例9: initialize

  initialize(options: any): void {
    super.initialize(options);
    this._nohit_warned = {};
    this.renderer = options.renderer;
    this.visuals = new Visuals(this.model);

    // Init gl (this should really be done anytime renderer is set,
    // and not done if it isn't ever set, but for now it only
    // matters in the unit tests because we build a view without a
    // renderer there)
    const { ctx } = this.renderer.plot_view.canvas_view;

    if (ctx.glcanvas != null) {
      let glglyphs;
      try {
        glglyphs = require("./webgl/index");
      } catch (e) {
        if (e.code === 'MODULE_NOT_FOUND') {
          logger.warn('WebGL was requested and is supported, but bokeh-gl(.min).js is not available, falling back to 2D rendering.');
          glglyphs = null;
        } else {
          throw e;
        }
      }

      if (glglyphs != null) {
        const Cls = glglyphs[this.model.type + 'GLGlyph'];
        if (Cls != null) {
          this.glglyph = new Cls(ctx.glcanvas.gl, this);
        }
      }
    }
  }
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:33,代码来源:glyph.ts

示例10: set_initial_range

 set_initial_range() {
   // check for good values for ranges before setting initial range
   let good_vals = true;
   const xrs = {};
   const yrs = {};
   for (const name in this.frame.x_ranges) {
     const rng = this.frame.x_ranges[name];
     if ((rng.start == null) || (rng.end == null) || isStrictNaN(rng.start + rng.end)) {
       good_vals = false;
       break;
     }
     xrs[name] = { start: rng.start, end: rng.end };
   }
   if (good_vals) {
     for (const name in this.frame.y_ranges) {
       const rng = this.frame.y_ranges[name];
       if ((rng.start == null) || (rng.end == null) || isStrictNaN(rng.start + rng.end)) {
         good_vals = false;
         break;
       }
       yrs[name] = { start: rng.start, end: rng.end };
     }
   }
   if (good_vals) {
     this._initial_state_info.range = this.initial_range_info = {xrs, yrs};
     return logger.debug("initial ranges set");
   } else {
     return logger.warn('could not set initial ranges');
   }
 }
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:30,代码来源:plot_canvas.ts


注:本文中的core/logging.logger.warn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。