Skip to content

Commit

Permalink
New method console.popup to send at the same time the text to the con…
Browse files Browse the repository at this point in the history
…sole (For logging purpose) and show it in a popup. Lines are split before sending to console, so every line is sent in different calls (i.e. the date is shown on every line).
  • Loading branch information
regorxxx committed Dec 23, 2021
1 parent 70b9ab6 commit 12696cd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Table of Contents]
- [Unreleased](#unreleased)
- [1.0.1](#101---2021-12-23)
- [1.0.0](#100---2021-10-08)

## [Unreleased][]
Expand All @@ -10,12 +11,20 @@
### Removed
### Fixed

## [1.0.1] - 2021-12-23
### Added
- New method console.popup to send at the same time the text to the console (For logging purpose) and show it in a popup. Lines are split before sending to console, so every line is sent in different calls (i.e. the date is shown on every line).
### Changed
### Removed
### Fixed

## [1.0.0] - 2021-10-08
### Added
- First release.
### Changed
### Removed
### Fixed

[Unreleased]: https://github.com/regorxxx/Console-SMP/compare/v1.0.0...HEAD
[Unreleased]: https://github.com/regorxxx/Console-SMP/compare/v1.0.1...HEAD
[1.0.1]: https://github.com/regorxxx/Console-SMP/compare/c21c65f...v1.0.1
[1.0.0]: https://github.com/regorxxx/Console-SMP/compare/c21c65f...v1.0.0
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.0
v1.0.1
12 changes: 10 additions & 2 deletions helpers/helpers_xxx_console.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
//08/10/21
//02/12/21

include(fb.ComponentPath + 'docs\\Codepages.js');

Expand Down Expand Up @@ -61,4 +61,12 @@ if (conLog && conLog.length && conLogMaxSize && console.log) {
utils.WriteTextFile(conLog, '', false);
console.log('helpers_xxx: console log file size exceeds ' + (conLogMaxSize / 10000000) + ' MB, creating new file: ' + conLog);
}
}
}

// Send to popup and console
console.popup = (arg, popupName) => {
fb.ShowPopupMessage(arg, popupName);
arg.split('\n').forEach((line) => {
if (line && line.length) {console.log(line);}
;});
}

0 comments on commit 12696cd

Please sign in to comment.