Automatic logging in GAP

This html describes how to automatically log all GAP input and output, the log files being labeled by time and date. It assumes that the user is running GAP on a linux/unix machine (or windows with cygwin installation - thanks to Gary Zablackis). The program was written by Yevgen Muntyan and myself.

For autologging

  1. Download logger.gap and put in in the directory /home/wdj/gapfiles/logger.gap (of course, change the path name /home/wdj/gapfiles/ to what you like).
  2. Edit the line
    gapfiles_path:="/home/wdj/gapfiles/"; ###### edit this to your path
    
    in logger.gap to what you have in (1) above.
  3. Create the directory /home/wdj/gapfiles/log (change the path name /home/wdj/gapfiles/ to what you have in (1) above).
  4. Put the following 2 lines in your .gaprc file:
         Read("/home/wdj/gapfiles/logger.gap");
         autologger();
    
    where the path name /home/wdj/gapfiles/ is what you have in (1) above. If you have windows with the cygwin installation, then put the following 2 lines in your .gaprc file:
         Read("/home/wdj/gapfiles/logger.gap");
         autologger_win();
    
That's it! Now every GAP command is automaticaly logged and filed by date and time in the log subdirectory.

Example:

gap> G:=SymmetricGroup(4); Size(G);
Sym( [ 1 .. 4 ] )
4
gap> 2^20; 2^100;
1048576
1267650600228229401496703205376
is logged as
G:=SymmetricGroup(4); Size(G);
#Sym( [ 1 .. 4 ] )
#24
2^20; 2^100;
#1048576
#1267650600228229401496703205376
The output is commented (so you can paste this back into GAP if you like).
wdj@usna.edu

Last updated 4-19-2005.

This page is at the url: http://www.usna.edu/Users/math/~wdj/gap/gap_autologging.html