File Policy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

File Policy

Valentin Ryckewaert
Hello everyone,

i'm currently working on making Pharo able to manage if it writes on his files.I created a class which can define it, then  I'm already able, for example, to define if Pharo writes on pharo.changes or not.

The meaning of this is to make Pharo able to execute a script but without being modified by it, a script shouldn't let any trace of its execution on the image or on Pharo files.

My problem concern PharoDebug.log, I would like to know what you prefer Pharo to do with it in the case we configured it to not write on his files (changes, source,image....).
Should Pharo writes the logs in the terminal ? in a tmp file ? or just in PharoDebug.log ?

Valentin


Reply | Threaded
Open this post in threaded view
|

Re: File Policy

demarey

> Le 22 juin 2016 à 14:05, Valentin Ryckewaert <[hidden email]> a écrit :
>
> Hello everyone,
>
> i'm currently working on making Pharo able to manage if it writes on his files.I created a class which can define it, then  I'm already able, for example, to define if Pharo writes on pharo.changes or not.
>
> The meaning of this is to make Pharo able to execute a script but without being modified by it, a script shouldn't let any trace of its execution on the image or on Pharo files.
>
> My problem concern PharoDebug.log, I would like to know what you prefer Pharo to do with it in the case we configured it to not write on his files (changes, source,image....).
> Should Pharo writes the logs in the terminal ? in a tmp file ? or just in PharoDebug.log ?

If you want to use Pharo as a script interpreter, then just do like other interpreter: report results and errors on stdout / stderr.
Then, you can redirect the output to also have it in a file if you want. I would not use PharoDebug.log or any other file.

Christophe


Reply | Threaded
Open this post in threaded view
|

Re: File Policy

tesonep@gmail.com
I think that using the stdout / stderr should be the way. It's the standard and expected way to behave.

Even though, I recommend you to perform a little test to see how the output is generated in the terminal, if everything is mixed up or it is quite long, maybe generating a file is not as bad idea, it will improve the way Pharo can be used by the command line. 

Other tools have different logging levels or even options to send the logging to a file. But that maybe is asking too much for a first version.

On Wed, Jun 22, 2016 at 2:12 PM, Christophe Demarey <[hidden email]> wrote:

> Le 22 juin 2016 à 14:05, Valentin Ryckewaert <[hidden email]> a écrit :
>
> Hello everyone,
>
> i'm currently working on making Pharo able to manage if it writes on his files.I created a class which can define it, then  I'm already able, for example, to define if Pharo writes on pharo.changes or not.
>
> The meaning of this is to make Pharo able to execute a script but without being modified by it, a script shouldn't let any trace of its execution on the image or on Pharo files.
>
> My problem concern PharoDebug.log, I would like to know what you prefer Pharo to do with it in the case we configured it to not write on his files (changes, source,image....).
> Should Pharo writes the logs in the terminal ? in a tmp file ? or just in PharoDebug.log ?

If you want to use Pharo as a script interpreter, then just do like other interpreter: report results and errors on stdout / stderr.
Then, you can redirect the output to also have it in a file if you want. I would not use PharoDebug.log or any other file.

Christophe





--
Pablo Tesone.
[hidden email]