How to use aurelia-logging - 10 common examples

To help you get started, we’ve selected a few aurelia-logging examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adarshpastakia / aurelia-ui-framework / src / utils / ui-tether.ts View on Github external
dropdownEl: HTMLDivElement,
    config: TetherConfig = Config
  ) {
    return attach(anchorEl, dropdownEl, { ...Config, ...config });
  }

  // Tether config
  const Config: TetherConfig = {
    anchorPosition: "bl",
    attachToViewport: false,
    position: "tl",
    resize: true
  };

  // Tether functionality
  const logger = getLogger("UITether");

  function updatePosition(
    anchorEl: Element,
    dropdownEl: HTMLDivElement,
    scrollerEl: Element,
    config
  ) {
    const anchorRect = anchorEl.getBoundingClientRect();
    const dropdownRect = dropdownEl.getBoundingClientRect();
    const scrollerRect = scrollerEl.getBoundingClientRect();

    if (config.resize !== false) {
      dropdownEl.style.minWidth = anchorRect.width + "px";
    }

    const [posY, posX] = config.position.split("");
github aurelia / cli / build / tasks / release-checks / tasks / install-latest-aurelia-cli.js View on Github external
const Task = require('./task');
const Yarn = require('../../../../lib/package-managers/yarn').Yarn;
const LogManager = require('aurelia-logging');
const logger = LogManager.getLogger('link-aurelia-cli');
const CLIOptions = require('../../../../lib/cli-options').CLIOptions;
const cliOptions = new CLIOptions();
const ConsoleUI = require('../../../../lib/ui').ConsoleUI;
const ui = new ConsoleUI();

let userArgs = process.argv.slice(2);
Object.assign(cliOptions, {
  args: userArgs.slice(1)
});

module.exports = class InstallLatestAureliaCLI extends Task {
  constructor() {
    super('Install latest Aurelia-CLI');
  }

  onOutput(message) {
github adarshpastakia / aurelia-ui-framework / dist / commonjs / ui-tether.js View on Github external
(function (UITether) {
    function tether(anchorEl, dropdownEl, config) {
        if (config === void 0) { config = Config; }
        return attach(anchorEl, dropdownEl, _tslib.__assign(_tslib.__assign({}, Config), config));
    }
    UITether.tether = tether;
    var Config = {
        anchorPosition: "bl",
        attachToViewport: false,
        position: "tl",
        resize: true
    };
    var logger = aureliaLogging.getLogger("UITether");
    function updatePosition(anchorEl, dropdownEl, scrollerEl, config) {
        var anchorRect = anchorEl.getBoundingClientRect();
        var dropdownRect = dropdownEl.getBoundingClientRect();
        var scrollerRect = scrollerEl.getBoundingClientRect();
        if (config.resize !== false) {
            dropdownEl.style.minWidth = anchorRect.width + "px";
        }
        var _a = _tslib.__read(config.position.split(""), 2), posY = _a[0], posX = _a[1];
        var _b = _tslib.__read(config.anchorPosition.split(""), 2), anchorY = _b[0], anchorX = _b[1];
        var rtl = isRtl(scrollerEl);
        var x = 0;
        var y = 0;
        var clientHeight = document.body.clientHeight;
        var clientWidth = document.body.clientWidth;
        var clientX = 0;
        var clientY = 0;
github adarshpastakia / aurelia-ui-framework / dist / es2017 / ui-tether.js View on Github external
(function (UITether) {
    function tether(anchorEl, dropdownEl, config = Config) {
        return attach(anchorEl, dropdownEl, Object.assign(Object.assign({}, Config), config));
    }
    UITether.tether = tether;
    const Config = {
        anchorPosition: "bl",
        attachToViewport: false,
        position: "tl",
        resize: true
    };
    const logger = getLogger("UITether");
    function updatePosition(anchorEl, dropdownEl, scrollerEl, config) {
        const anchorRect = anchorEl.getBoundingClientRect();
        const dropdownRect = dropdownEl.getBoundingClientRect();
        const scrollerRect = scrollerEl.getBoundingClientRect();
        if (config.resize !== false) {
            dropdownEl.style.minWidth = anchorRect.width + "px";
        }
        const [posY, posX] = config.position.split("");
        const [anchorY, anchorX] = config.anchorPosition.split("");
        const rtl = isRtl(scrollerEl);
        let x = 0;
        let y = 0;
        let clientHeight = document.body.clientHeight;
        let clientWidth = document.body.clientWidth;
        let clientX = 0;
        let clientY = 0;
github aurelia / templating / src / view-resources.js View on Github external
export function validateBehaviorName(name: string, type: string) {
  if (/[A-Z]/.test(name)) {
    let newName = _hyphenate(name);
    LogManager
      .getLogger('templating')
      .warn(`'${name}' is not a valid ${type} name and has been converted to '${newName}'. Upper-case letters are not allowed because the DOM is not case-sensitive.`);
    return newName;
  }
  return name;
}
github aurelia / templating / dist / es2015 / aurelia-templating.js View on Github external
function validateBehaviorName(name, type) {
  if (/[A-Z]/.test(name)) {
    let newName = _hyphenate(name);
    LogManager.getLogger('templating').warn(`'${ name }' is not a valid ${ type } name and has been converted to '${ newName }'. Upper-case letters are not allowed because the DOM is not case-sensitive.`);
    return newName;
  }
  return name;
}
github aurelia / ux / packages / core / dist / es2015 / index.js View on Github external
constructor(loader, globalStyleEngine) {
        this.loader = loader;
        this.globalStyleEngine = globalStyleEngine;
        this.logger = getLogger('aurelia-ux');
    }
    defaultConfiguration() {
github aurelia / ux / packages / core / dist / es2015 / ux-configuration.js View on Github external
constructor(loader, globalStyleEngine) {
        this.loader = loader;
        this.globalStyleEngine = globalStyleEngine;
        this.logger = getLogger('aurelia-ux');
    }
    defaultConfiguration() {
github adarshpastakia / aurelia-ui-framework / dist / es2015 / utils / ui-application.js View on Github external
constructor(router) {
        this.router = router;
        this.isBusy = false;
        this.constants = UIConstants;
        this.Authenticated = false;
        this.sharedState = {};
        this.logger = getLogger('UIApplication');
        this.logger.info('Initialized');
    }
    navigate(hash, options) {
github SpoonX / aurelia-datatable / dist / es2015 / convert-manager.js View on Github external
constructor(viewResources) {
    this.viewResources = viewResources;
    this.logger = getLogger('aurelia-datatable');
  }

aurelia-logging

A minimal but effective logging mechanism with support for log levels and pluggable log appenders.

MIT
Latest version published 5 years ago

Package Health Score

53 / 100
Full package analysis

Popular aurelia-logging functions