Author Topic: PJSR: console.logText/endLog end of ByteArray issue?  (Read 4262 times)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
PJSR: console.logText/endLog end of ByteArray issue?
« on: 2014 December 24 14:30:11 »
Quote
* New static methods of the Console core JavaScript object:

   void Console.beginLog()
   ByteArray Console.endLog()
   ByteArray Console.logText()

Hi Juan,

These are very useful. On Win 7 1023: endLog() and logText() sometimes return a few garbage characters on the final line at end of the ByteArray. This line has no time stamp.

Thank,
Mike

This example ends with an "i" on the final line. I have also seen other things like "@G", etc.

Code: [Select]
...
[2014-12-24 21:46:12]
[2014-12-24 21:46:12] Writing console log file:
[2014-12-24 21:46:12] C:/Users/Public/Documents/Astronomy/PixInsight/Scripts/WavefrontCurvatureEstimator/Tests/FSQ-106EDX/2014_01_04/Tests/r-band/Estimation/console_log.txt
i

Code is something like this:

Code: [Select]
console.beginLog();
...
console.flush();
File.writeFile(path, console.endLog());

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PJSR: console.logText/endLog end of ByteArray issue?
« Reply #1 on: 2014 December 26 02:41:49 »
This is obviously a bug. It doesn't happen on Linux, and I bet it doesn't happen on OS X either (I don't have a Mac machine at hand here, so I can't say for sure). Thank you for reporting. I'll investigate this problem when I get back home in January.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/