Using aurelia's logger

I have this code, but my log message never shows, note the app seems to start fine, and default log messages show, just not this one.

import { Aurelia, LogManager } from 'aurelia-framework'
import { PLATFORM } from 'aurelia-pal';
import { LogLevel } from 'aurelia-store';
import * as environment from '../config/environment.json';
import { initialState } from './State';
import { setAutoFreeze } from 'immer';
import { ConsoleAppender } from "aurelia-logging-console";

export function configure(aurelia: Aurelia) {
  aurelia.use
    .standardConfiguration()
    .feature(PLATFORM.moduleName('resources/index'));

  LogManager.addAppender(new ConsoleAppender());
  LogManager.setLevel(LogManager.logLevel.debug);
  LogManager.getLogger('main').debug('initializing');
  setAutoFreeze(environment.debug || environment.testing);

  if (environment.testing) {
    aurelia.use.plugin(PLATFORM.moduleName('aurelia-testing'));
  }
  aurelia.use.plugin(PLATFORM.moduleName('aurelia-store'), {
    initialState,
    logDispatchedActions: true,
    logDefinitions: {
      dispatchedActions: LogLevel.info
    }
  });

  aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app')));
}
2 Likes

In your devtool console, did you check this:

image

2 Likes