[Pharo-users] Re: How to log pharo output to stdio safely?

2024-04-20 Thread Tim
Hey Guillermo what I’ve notice is that if you need to guarantee a line of text is output (as you do for logging before a critical operation) then you : Transcript show: ‘some log string’; cr Doesn’t show output when piped to stdio (as when headless mode running on a server). If non critical

[Pharo-users] Re: How to log pharo output to stdio safely?

2024-04-19 Thread Richard O'Keefe
In the C world, - flush forces data from user-space buffers to OS buffers - sync forces data from OS buffers to devices - there is no standard documented way to force devices to move data from buffers to persistent storage even when the device has such an operation and the OS knows how to

[Pharo-users] Re: How to log pharo output to stdio safely?

2024-04-19 Thread Guillermo Polito
Hi Tim, In general, doing a flush should suffice. Generally, the buffer is flushed automatically when full. You generally don’t need to flush manually unless you are in a special case (like, you’re about to quit the process and you want to flush the buffer before quitting). About the comment,

[Pharo-users] Re: How to log pharo output to stdio safely?

2024-04-18 Thread Tim Mackinnon
Just as a comment on this - I tried using #sync as an experiment and I get a primFailed on an Ubuntu docker image - so I think that comment in the image is misleading (or its a bug, or unfinished work) On Thu, 18 Apr 2024, at 11:15 AM, Tim Mackinnon wrote: > Hi Stef - I was aware of that

[Pharo-users] Re: How to log pharo output to stdio safely?

2024-04-18 Thread Tim Mackinnon
Hi Stef - I was aware of that class - but a good reminder to re-read it for any extra info, but I don't see anything in particular mentioned about how data is flushed - and I think this is one of those black arts from in the field. It looks like stdio uses an Stdiostream - and I did note an

[Pharo-users] Re: How to log pharo output to stdio safely?

2024-04-17 Thread stephane ducasse
just out of my mind and before breakfast :) did you see Stdio ? S > On 18 Apr 2024, at 01:31, Tim Mackinnon wrote: > > Hi - I've been messing around with deploying a hobby pharo app to the web.. > which has become a lot simpler over the years, although the tech keeps > changing and you have