Index: /issm/trunk/test/NightlyRun/runme.m
===================================================================
--- /issm/trunk/test/NightlyRun/runme.m	(revision 5083)
+++ /issm/trunk/test/NightlyRun/runme.m	(revision 5084)
@@ -62,4 +62,11 @@
 	disp('runme warning: procedure not supported, defaulting to test ''check''')
 	procedure='check';
+end
+% }}}
+%GET output {{{1
+output=getfieldvalue(options,'output','none');
+if ~ismember(output,{'nightly','daily','none'})
+	disp('runme warning: output not supported, defaulting to test ''none''')
+	output='none';
 end
 % }}}
@@ -142,10 +149,17 @@
 					directory=strsplit(pwd,'/');
 					message=getReport(me2)
-					fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
-					fprintf(fid,'%s',message);
-					fprintf(fid,'\n------------------------------------------------------------------\n');
-					fclose(fid);
-					disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
-
+					if strcmpi(output,'nightly')
+						fid=fopen([ISSM_DIR '/nightlylog/matlaberror.log'], 'at');
+						fprintf(fid,'%s',message);
+						fprintf(fid,'\n------------------------------------------------------------------\n');
+						fclose(fid);
+						disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
+					elseif strcmpi(output,'daily');
+						fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at');
+						fprintf(fid,'%s',message);
+						fprintf(fid,'\n------------------------------------------------------------------\n');
+						fclose(fid);
+						disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
+					end
 				end
 			end
@@ -157,9 +171,17 @@
 		directory=strsplit(pwd,'/');
 		message=getReport(me)
-		fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
-		fprintf(fid,'%s',message);
-		fprintf(fid,'\n------------------------------------------------------------------\n');
-		fclose(fid);
-		disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: N/A'],id,Id2Name(id)));
+		if strcmpi(output,'nightly')
+			fid=fopen([ISSM_DIR '/nightlylog/matlaberror.log'], 'at');
+			fprintf(fid,'%s',message);
+			fprintf(fid,'\n------------------------------------------------------------------\n');
+			fclose(fid);
+			disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
+		elseif strcmpi(output,'daily');
+			fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at');
+			fprintf(fid,'%s',message);
+			fprintf(fid,'\n------------------------------------------------------------------\n');
+			fclose(fid);
+			disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
+		end
 	end
 end
