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


TypeScript LogManager.getLogger方法代码示例

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


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

示例1: parseGridRow

	private parseGridRow(element: any): GridRowAttributes {
		// Pull any row attrs into a hash object
		var rowsAttributes = new GridRowAttributes();

		var rowElement = element.querySelector("grid-row");
		if(!rowElement){
			LogManager.getLogger("aurelia-grid").warn("Grid has no <grid-row> defined");
			return rowsAttributes;
		}
		
		var attrs = Array.prototype.slice.call(rowElement.attributes);
		attrs.forEach(a => rowsAttributes[a.name] = a.value);

		return rowsAttributes;
	}
开发者ID:Good-AureliaExamples,项目名称:aurelia-grid,代码行数:15,代码来源:grid-parser.ts

示例2: parseGridCols

	private parseGridCols(element: any): GridColumn[] {
		var rowElement = element.querySelector("grid-row");
		if(!rowElement){
			LogManager.getLogger("aurelia-grid").warn("Grid has no <grid-row> defined");
			return [];
		}
		var columnElements = Array.prototype.slice.call(rowElement.querySelectorAll("grid-col"));
		var cols = [];

		var columnTemplate =
			'<span class="grid-column-heading">${$column.heading}</span>' +
			'<span if.bind="$column.sorting === \'desc\'" class="${$grid.icons.sortingDesc}"></span>' +
			'<span if.bind="$column.sorting === \'asc\'" class="${$grid.icons.sortingAsc}"></span>';

		// <grid-col can-sort="true" heading="header"> ..
		// or <grid-col can-sort="true"><heading>header template</heading><template>cell template</template> 
		columnElements.forEach(c => {
			var col = new GridColumn();

			var attrs = Array.prototype.slice.call(c.attributes);
			attrs.forEach(a => this.tryAssign(col, this.camelCaseName(a.name), a.value));

			// check for inner <heading> of template
			var headingTemplate = c.querySelector("heading");
			col.headingTemplate = (headingTemplate && headingTemplate.innerHTML) ? headingTemplate.innerHTML : columnTemplate;
		
			// check for inner content of <template> or use full content as template
			var cellTemplate = c.querySelector("template");
			col.template = (cellTemplate && cellTemplate.innerHTML) ? cellTemplate.innerHTML : c.innerHTML;

			col.init();
			cols.push(col);
		});

		return cols;
	}
开发者ID:Good-AureliaExamples,项目名称:aurelia-grid,代码行数:36,代码来源:grid-parser.ts

示例3: constructor

import {bindable, containerless, inject, LogManager} from 'aurelia-framework';
import {EventAggregator} from 'aurelia-event-aggregator';
import {ColumnDefinition} from './column-definition';
import {GridOptions} from './grid-options';
import {GridAction} from './grid-action';

let logger = LogManager.getLogger('grid');

@containerless()
@inject(EventAggregator)
export class Grid {
  @bindable public data: any[];
  @bindable public actions: GridAction[];
  @bindable public options: GridOptions;

  @bindable public selectedColumnId: number;
  @bindable public selectedRowId: number;
  @bindable public sortedColumnId: number;
  @bindable public hoveredRowId: number;
  @bindable public hoveredColumnId: number;

  public columnDefinitions: ColumnDefinition[];
  public enableInlineEditing: boolean;
  public enableColumnSorting: boolean;
  public rows: any[];
  public sortDirection: string;
  public hasIndividualColumnPerAction: boolean;
  private _id: string;
  private _eventAggregator: EventAggregator;

  public constructor(eventAggregator: EventAggregator) {
开发者ID:PdUi,项目名称:aurelia,代码行数:31,代码来源:grid.ts

示例4: configureRouter

import { LogManager } from 'aurelia-framework';
import { RouterConfiguration } from 'aurelia-router';

const logger = LogManager.getLogger('adventure');

export class Adventure {
    configureRouter(config: RouterConfiguration): void {
        logger.debug("configuring the router");
        config.title = "SKG - Adventure";
        config.map([
            { route: '', redirect: 'level-select' },
            { route: 'level-select', name: 'level-select', moduleId: 'level-select/level-select' }
        ]);
        config.mapUnknownRoutes('level-select/level-select');
    }
}
开发者ID:TylerLeite,项目名称:supa-kyapucha-gemu,代码行数:16,代码来源:adventure.ts

示例5: configureRouter

import { LogManager } from 'aurelia-framework';
import { RouterConfiguration } from 'aurelia-router';

const logger = LogManager.getLogger('app');

export class App {
    configureRouter(config: RouterConfiguration): void {
        logger.debug("configuring the router");
        config.title = "SKG";
        config.map([
            { route: ['', 'home'], name: 'home', moduleId: 'home/home' },
            { route: 'online', name: 'online', moduleId: 'online/online' },
            { route: 'local', name: 'local', moduleId: 'local/local' },
            { route: 'adventure', name: 'adventure', moduleId: 'adventure/adventure' },
            { route: 'skynet', name: 'skynet', moduleId: 'aigame/aigame' }
        ]);
        config.mapUnknownRoutes('home/home');
    }
}
开发者ID:TylerLeite,项目名称:supa-kyapucha-gemu,代码行数:19,代码来源:app.ts

示例6: getLogger

export function getLogger(moduleId: string): Logger {
  return LogManager.getLogger(moduleId);
}
开发者ID:SoftwareMasons,项目名称:aurelia-openiddict,代码行数:3,代码来源:getLogger.ts

示例7: configure

import Cycle from '@cycle/rxjs-run'
import {Observable, Observer, Subscription, BehaviorSubject, ReplaySubject, Subject, Subscriber} from 'rxjs/Rx'
import { DriverFunction } from '@cycle/base'
import {LogManager, FrameworkConfiguration, declarePropertyDependencies, computedFrom, autoinject, Container} from 'aurelia-framework';
import {ViewEngineHooks, View, Controller} from 'aurelia-templating'
import {ContextChanges, ChangeOrigin, ChangeType} from './basic-bindings'

export {Observable, Observer, Subscription, BehaviorSubject, ReplaySubject, Subject} from 'rxjs/Rx'
export * from './basic-bindings'
const logger = LogManager.getLogger('aurelia-plugin-skeleton')

export function configure(frameworkConfig: FrameworkConfiguration) {
  const viewResources = frameworkConfig.aurelia.resources
  const diContainer = frameworkConfig.container
  
  const hooks = {
    beforeBind: function (view: View & {bindingContext; controller: Controller}) {
      if (view.controller !== null) {
        const context = view.controller.viewModel as any
        
        if (!context || typeof context.cycle !== 'function') return
        const count = context._cycleCount = (context._cycleCount || 0) + 1
    
        if (context._cycleCount > 1) {
          logger.error('would run the cycle more then once!', count)
          return
        }
    
        const preparedSources = context.cycleDrivers || {}
        const { drivers, onBind, onUnbind, dispose } = makeBindingDrivers(context, diContainer) //observerLocator, strategyLocator, signaler
        
开发者ID:niieani,项目名称:aurelia-cycle,代码行数:30,代码来源:index.ts

示例8: constructor

import {autoinject, LogManager} from 'aurelia-framework';
import {EventAggregator} from 'aurelia-event-aggregator';
import {NavigationInstruction, Router, RouterConfiguration} from 'aurelia-router';
import {AuthPlugin} from 'auth-plugin';

let logger = LogManager.getLogger('ROUTER');

@autoinject
export default class {
    constructor(private router: Router, private eventAggregator: EventAggregator) {
    }

    prepare() {
        if (this.router.isConfigured) {
            return;
        }

        this.router.configure((config: RouterConfiguration) => {
            config.title = 'Aurelia';
            config.map([
                { route: ['', 'login'], name: 'login', moduleId: 'login' },
                { route: 'page1', name: 'page1', moduleId: 'page1', settings: { auth: true } },
                { route: 'page2', name: 'page2', moduleId: 'page2', settings: { auth: true } }
            ]);
            config.addAuthorizeStep(AuthPlugin);

            return config;
        });

        let callback = (eventArgs: Object, name) => {
            logger.warn(eventArgs['instruction']['config']['name'], name);
开发者ID:codeaid,项目名称:skeleton-navigation,代码行数:31,代码来源:router-config.ts

示例9:

import {LogManager} from 'aurelia-framework';

export const log = LogManager.getLogger('jobsweb');
开发者ID:Resounding,项目名称:Jobs-Web,代码行数:3,代码来源:log.ts

示例10: getLogger

/** Call this function to get an logger 
 * 
 * @param {string} name Provide a name for the logger
 * @return {Logger}
 */
function getLogger(name: String): Logger {
    return LogManager.getLogger(name);
}
开发者ID:black-banana,项目名称:bee-dance,代码行数:8,代码来源:logger.ts


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