Writing data to log file

Posted By: aelagha

Writing data to log file - 01/25/23 11:28

Hi there,

When I use printf("#..." or print(TO_LOG, ...) to write additional information to the "strategyname"_test.log file on the same lien as line #, date, time, close, I get an additional empty newline, see below. Is there a way to prevent adding the empty new line? I tried using different escape chars to get rid of it but no luck. thanks.

------------
[54078: Tue 23-01-24 19:21] (4018.75) O:4018.75 H:4019.00 L:4018.50 C:4018.75

[54079: Tue 23-01-24 19:22] (4018.75) O:4018.75 H:4018.75 L:4018.25 C:4018.75
-----------
Posted By: aelagha

Re: Writing data to log file - 01/25/23 11:41

NEvermind. Using TO_FILE instead of TO_LOG works and does not print the emplty new line.
© 2024 lite-C Forums