How to use @jupyterlab/logconsole - 10 common examples

To help you get started, we’ve selected a few @jupyterlab/logconsole 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 jupyterlab / jupyterlab / packages / logconsole-extension / src / index.tsx View on Github external
function activateLogConsole(
  app: JupyterFrontEnd,
  labShell: ILabShell,
  rendermime: IRenderMimeRegistry,
  nbtracker: INotebookTracker,
  palette: ICommandPalette | null,
  restorer: ILayoutRestorer | null,
  mainMenu: IMainMenu | null,
  settingRegistry: ISettingRegistry | null,
  statusBar: IStatusBar | null
): ILoggerRegistry {
  let logConsoleWidget: MainAreaWidget = null;
  let logConsolePanel: LogConsolePanel = null;

  const loggerRegistry = new LoggerRegistry({
    defaultRendermime: rendermime,
    // The maxLength is reset below from settings
    maxLength: 1000
  });

  const tracker = new WidgetTracker>({
    namespace: 'logconsole'
  });

  if (restorer) {
    void restorer.restore(tracker, {
      command: CommandIDs.open,
      name: () => 'logconsole'
    });
  }
github jupyterlab / jupyterlab / packages / logconsole-extension / src / index.tsx View on Github external
function activateLogConsole(
  app: JupyterFrontEnd,
  labShell: ILabShell,
  rendermime: IRenderMimeRegistry,
  nbtracker: INotebookTracker,
  palette: ICommandPalette | null,
  restorer: ILayoutRestorer | null,
  mainMenu: IMainMenu | null,
  settingRegistry: ISettingRegistry | null,
  statusBar: IStatusBar | null
): ILoggerRegistry {
  let logConsoleWidget: MainAreaWidget = null;
  let logConsolePanel: LogConsolePanel = null;

  const loggerRegistry = new LoggerRegistry({
    defaultRendermime: rendermime,
    // The maxLength is reset below from settings
    maxLength: 1000
  });

  const tracker = new WidgetTracker>({
    namespace: 'logconsole'
  });

  if (restorer) {
    void restorer.restore(tracker, {
      command: CommandIDs.open,
      name: () => 'logconsole'
    });
  }
github jupyterlab / jupyterlab / tests / test-logconsole / src / logger.spec.ts View on Github external
it('should set the max length', async () => {
      const model = new LoggerOutputAreaModel({ maxLength: 10 });
      expect(model.maxLength).toEqual(10);
      model.dispose();
    });
  });
github jupyterlab / jupyterlab / tests / test-logconsole / src / widget.spec.ts View on Github external
beforeEach(() => {
    defaultRendermime = new RenderMimeRegistry({ initialFactories });
    registry = new LoggerRegistry({
      defaultRendermime,
      maxLength: 10
    });
    logConsole = new LogConsolePanel(registry);
  });
  afterEach(() => {
github jupyterlab / jupyterlab / tests / test-logconsole / src / registry.spec.ts View on Github external
beforeEach(() => {
    defaultRendermime = new RenderMimeRegistry();
    registry = new LoggerRegistry({
      defaultRendermime,
      maxLength: 10
    });
  });
github jupyterlab / jupyterlab / tests / test-logconsole / src / widget.spec.ts View on Github external
beforeEach(() => {
    defaultRendermime = new RenderMimeRegistry({ initialFactories });
    registry = new LoggerRegistry({
      defaultRendermime,
      maxLength: 10
    });
    logConsole = new LogConsolePanel(registry);
  });
  afterEach(() => {
github jupyterlab / jupyterlab / tests / test-logconsole / src / logger.spec.ts View on Github external
beforeEach(() => {
    model = new LoggerOutputAreaModel({ maxLength: 10 });
  });
  afterEach(() => {
github jupyterlab / jupyterlab / tests / test-logconsole / src / logger.spec.ts View on Github external
beforeEach(() => {
    logger = new Logger({ source: 'test source', maxLength: 10 });
  });
  afterEach(() => {
github jupyterlab / jupyterlab / packages / logconsole-extension / src / index.tsx View on Github external
const createLogConsoleWidget = (options: ILogConsoleOptions = {}) => {
    logConsolePanel = new LogConsolePanel(loggerRegistry);

    logConsolePanel.source =
      options.source !== undefined
        ? options.source
        : nbtracker.currentWidget
        ? nbtracker.currentWidget.context.path
        : null;

    logConsoleWidget = new MainAreaWidget({ content: logConsolePanel });
    logConsoleWidget.addClass('jp-LogConsole');
    logConsoleWidget.title.closable = true;
    logConsoleWidget.title.label = 'Log Console';
    logConsoleWidget.title.iconClass = 'jp-LogConsoleIcon';

    const addCheckpointButton = new CommandToolbarButton({
      commands: app.commands,
github jupyterlab / jupyterlab / packages / logconsole-extension / src / index.tsx View on Github external
const createLogConsoleWidget = (options: ILogConsoleOptions = {}) => {
    logConsolePanel = new LogConsolePanel(loggerRegistry);

    logConsolePanel.source =
      options.source !== undefined
        ? options.source
        : nbtracker.currentWidget
        ? nbtracker.currentWidget.context.path
        : null;

    logConsoleWidget = new MainAreaWidget({ content: logConsolePanel });
    logConsoleWidget.addClass('jp-LogConsole');
    logConsoleWidget.title.closable = true;
    logConsoleWidget.title.label = 'Log Console';
    logConsoleWidget.title.iconClass = 'jp-ListIcon';

    const addCheckpointButton = new CommandToolbarButton({
      commands: app.commands,

@jupyterlab/logconsole

JupyterLab - Log Console

BSD-3-Clause
Latest version published 3 days ago

Package Health Score

95 / 100
Full package analysis

Similar packages