How to use the blessed.log function in blessed

To help you get started, we’ve selected a few blessed 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 njhoffman / debugger-256 / termui / ui.js View on Github external
fullUnicode: true
});
screen.title = 'Message Sender';

process.on('uncaughtException', (err) => {
  screen.log(`${err.name} ${err.message} ${err.stack}`);
  console.error(err);
  setTimeout(() => {
    process.exit(1);
  }, 3000);
});

screen.log('screen root node loaded');

// Create a box perfectly centered horizontally and vertically.
const logBox = blessed.log({
  top: 0,
  left: 0,
  height: '100%-1',
  mouse: true,
  vi: true,
  scrollOnInput: false,
  scrollable: true,
  alwaysScroll: true,
  scrollbar: {
    ch: ' ',
    track: {
      bg: 'cyan'
    },
    style: {
      bg: 'black',
      fg: 'blue'
github NMMES / nmmes-cli / src / screen.js View on Github external
}));
        // this._sysInfo = blessed.text(merge({}, defaults.text, {
        //     parent: this._statusBar,
        //     content: ''
        // }));

        this._videoList = blessed.box(merge({}, defaults.box, {
            parent: this,
            label: 'Video List',
            left: 0,
            top: 0,
            bottom: this._statusBar.height,
            width: 50
        }));

        this._log = blessed.log(merge({}, defaults.box, {
            parent: this,
            scrollback: 10000,
            scrollbar: {
                ch: ' ',
                inverse: true
            },
            mouse: true,
            label: 'Log',
            right: 0,
            top: 0,
            bottom: this._statusBar.height,
            width: this.width - this._videoList.width + 1
        }));
        this._log.on('scroll', this.render.bind(this));

        this._videoListStatus = blessed.text(merge({}, defaults.text, {
github mscdex / ssh2 / examples / server-chat.js View on Github external
var screen = new blessed.screen({
          autoPadding: true,
          smartCSR: true,
          program: new blessed.program({
            input: stream,
            output: stream
          }),
          terminal: term || 'ansi'
        });

        screen.title = 'SSH Chatting as ' + name;
        // Disable local echo
        screen.program.attr('invisible', true);

        var output = stream.output = new blessed.log({
          screen: screen,
          top: 0,
          left: 0,
          width: '100%',
          bottom: 2,
          scrollOnInput: true
        })
        screen.append(output);

        screen.append(new blessed.box({
          screen: screen,
          height: 1,
          bottom: 1,
          left: 0,
          width: '100%',
          type: 'line',
github bahmutov / wiseli / index.js View on Github external
const name = findModuleToInstall()
if (!name) {
  console.error('  [--save|--save-dev]')
  process.exit(-1)
}
const spawn = require('cross-spawn-async')
const blessed = require('blessed')

const screen = blessed.screen({
  smartCSR: true,
  dockBorders: true,
  ignoreDockContrast: true
})
screen.title = 'wiseli'

const npmOutput = blessed.log({
  label: 'NPM output',
  left: 0,
  top: 0,
  border: 'line',
  padding: {
    top: 1,
    bottom: 1
  },
  style: {
    width: '100%',
    height: '30%',
    fg: 'white',
    border: {
      fg: '#f0f0f0'
    }
  }
github taurusai / kungfu / cli / src / components / monitor / index.js View on Github external
initLog(){
        this.mergedLogs = blessed.log({
            ...TABLE_BASE_OPTIONS,
            label: ' Merged Logs ',
            parent: this.screen,
            top: '0',
            left: WIDTH_LEFT_PANEL + '%',
            width: 100 - WIDTH_LEFT_PANEL + '%',
            height: '95%-1',
            padding: DEFAULT_PADDING,
			mouse: true,
            style: {
                ...TABLE_BASE_OPTIONS.style,
                selected: {
					bold: true,
                }
            }
        })
github vslinko / ripster / server / windowLog.js View on Github external
border: {
    type: 'line',
  },
  scrollable: true,
  scrollbar: {},
  style: {
    scrollbar: {
      bg: 'gray',
    },
    border: {
      fg: 'gray',
    },
  },
});

const frontendLog = blessed.log({
  parent: screen,
  label: 'frontend',
  top: '20%-1',
  left: '0',
  width: '100%',
  height: '36%+1',
  border: {
    type: 'line',
  },
  scrollable: true,
  scrollbar: {},
  style: {
    scrollbar: {
      bg: 'gray',
    },
    border: {
github cory2067 / mongo-ranger / components.js View on Github external
function logger() {
  const logger = blessed.log({
    left: "80%",
    height: "100%",
    label: "Debug Log",
    width: "20%",
    tags: true,
    border: {
      type: "line"
    }
  });

  logger.logObject = obj => logger.log(util.stringify(obj));

  return logger;
}
github goto-bus-stop / dizzay / dizzay-ui / src / ui.js View on Github external
module.exports = function ui(mp) {
  const screen = blessed.screen({
    title: 'Dizzay',
    warnings: true,
    fastCSR: true
  })

  const chatMessages = blessed.log({
    width: '30%',
    height: '100%-2',
    top: 0,
    right: 0,
    scrollable: true,
    scrollback: 512,
    alwaysScroll: false,
    tags: true,
    mouse: true,
    keys: true,
    style: {
      bg: 'purple',
      fg: 'white'
    }
  })
github embark-framework / embark / lib / dashboard / monitor.js View on Github external
width: "100%",
      height: "55%",
      left: "0%",
      top: "42%",
      border: {
        type: "line"
      },
      style: {
        fg: -1,
        border: {
          fg: this.color
        }
      }
    });

    this.logText = blessed.log({
      parent: this.log,
      tags: true,
      width: "100%-5",
      //height: '90%',
      scrollable: true,
      input: false,
      alwaysScroll: true,
      scrollbar: {
        ch: " ",
        inverse: true
      },
      keys: false,
      vi: false,
      mouse: true
    });
github Tibing / platform-terminal / projects / platform-terminal / src / lib / adapters / log.ts View on Github external
export function logAdapter(options?: Widgets.LogOptions) {
  return blessed.log({ ...options, ...defaultOptions });
}