Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Automatic logging of executed input cells to a file
ResourceFunction["ToggleLogInputs"][] starts or stops input logging to an autocreated log file. | |
ResourceFunction["ToggleLogInputs"][file] starts or stops input logging to a given log file. |
"AppendLog" | True | whether to append lines or overwrite log file content |
FormatType | InputForm | specify the format type when logging expressions |
PageWidth | 80 | specify how wide each line of text is allowed to be in the log file |
"PrintLog" | True | whether to print a paneled view of the file when logging stops |
Start logging your inputs:
In[1]:= |
In[2]:= |
Perform work in your session:
In[3]:= |
Out[3]= |
In[4]:= |
Out[4]= |
When you are done, stop logging:
In[5]:= |
By default, ToggleLogInputs will append to log files:
In[6]:= |
In[7]:= |
In[8]:= |
In[9]:= |
Out[9]= |
When logging is stopped, ToggleLogInputs displays its contents in a panel:
In[10]:= |
Out[10]= |
In[11]:= |
In[12]:= |
Note that each input is written as a line of box data:
In[13]:= |
To overwrite an existing log rather than append to it, use the option "AppendLog"→ False:
In[14]:= |
In[15]:= |
Once logging is stopped, process the log file however you like:
In[16]:= |
Out[16]= |
In[17]:= |
In[18]:= |
This work is licensed under a Creative Commons Attribution 4.0 International License