How to save console output in XCode Playground?

XCode 10.0 beta 3, Mac Mojave 10.14 Beta


I am using

MLImageClassifier(trainingData: MLImageClassifier.DataSource,
parameters: MLImageClassifier.ModelParameters)


from CreateML-Framework to create a custom mlmodel in XCode Playground.


This method generates the following ouptut:


https://i.stack.imgur.com/qaIWM.png


I would like to save this output to a text file, but I don't know how to access the data and I can't find the location where it is produced.

I am thankful for every help.

Replies

Sorry if this is a trivial comment: can't you copy and paste in a text editor ?


for less basic solution, could you redirect output of console ?

https://stackoverflow.com/questions/7271528/how-to-nslog-into-a-file

Thanks for the quick reply.


For them moment I do manually copy and paste the console output.

Since I will have a lot of different model training scripts I would like

to automate the output-saving.


I already tried the suggested link, but it didn't work out for me.

Since I can't locate where the console output is generated,

it is not possible to know how it is produced (NSLog, print, etc.).

I'm in the same case as I can't locate where the console output is generated, but I want to save all the output into a file. Do you know how I can do it?