configure blessed's screen log and/or dump

This commit is contained in:
mamachanko 2019-03-18 19:38:01 +01:00
parent 706d838bd3
commit 587793ea00
No known key found for this signature in database
GPG Key ID: 09782D53A40DA56B
2 changed files with 23 additions and 3 deletions

View File

@ -6,6 +6,24 @@ let screen: blessed.Widgets.Screen = null;
// https://github.com/chjj/blessed/blob/master/test/widget-autopad.js
screen = blessed.screen({
log: __dirname + "/logs/just-logs.log"
});
screen = blessed.screen({
log: __dirname + "/logs/just-logs.log",
dump: false
});
screen = blessed.screen({
dump: __dirname + "/logs/logs-and-all-in-and-output.log"
});
screen = blessed.screen({
log: __dirname + "/logs/logs-and-all-in-and-output.log",
dump: true
});
screen = blessed.screen({
dump: __dirname + "/logs/autopad.log",
smartCSR: true,

View File

@ -1,6 +1,8 @@
// Type definitions for blessed 0.1
// Project: https://github.com/chjj/blessed
// Definitions by: Bryn Austin Bellomy <https://github.com/brynbellomy>, Steve Kellock <https://github.com/skellock>
// Definitions by: Bryn Austin Bellomy <https://github.com/brynbellomy>
// Steve Kellock <https://github.com/skellock>
// Max Brauer <https://github.com/mamachanko>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// TypeScript Version: 2.1
@ -925,12 +927,12 @@ export namespace Widgets {
/**
* Create a log file. See log method.
*/
log?(...msg: any[]): void;
log?: string;
/**
* Dump all output and input to desired file. Can be used together with log option if set as a boolean.
*/
dump?: string;
dump?: string | boolean;
/**
* Debug mode. Enables usage of the debug method. Also creates a debug console which will display when