--- freem/src/log.c	2025/01/19 02:04:04	1.1
+++ freem/src/log.c	2025/04/01 23:21:45	1.6
@@ -1,23 +1,11 @@
 /*
- *                            *
- *                           * *
- *                          *   *
- *                     ***************
- *                      * *       * *
- *                       *  MUMPS  *
- *                      * *       * *
- *                     ***************
- *                          *   *
- *                           * *
- *                            *
- *
- *   log.c
- *	  freem error logging
+ *   $Id: log.c,v 1.6 2025/04/01 23:21:45 snw Exp $
+ *    freem error logging
  *
  *  
- *   Author: Serena Willis <jpw@coherent-logic.com>
+ *   Author: Serena Willis <snw@coherent-logic.com>
  *    Copyright (C) 1998 MUG Deutschland
- *    Copyright (C) 2020 Coherent Logic Development LLC
+ *    Copyright (C) 2020, 2025 Coherent Logic Development LLC
  *
  *
  *   This file is part of FreeM.
@@ -35,11 +23,24 @@
  *   You should have received a copy of the GNU Affero Public License
  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
  *
+ *   $Log: log.c,v $
+ *   Revision 1.6  2025/04/01 23:21:45  snw
+ *   fmadm commands for stopping, starting, and restarting environments now functional
+ *
+ *   Revision 1.5  2025/04/01 20:11:46  snw
+ *   Further work on fmadm
+ *
+ *   Revision 1.4  2025/03/09 19:50:47  snw
+ *   Second phase of REUSE compliance and header reformat
+ *
+ *
+ * SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
+ * SPDX-License-Identifier: AGPL-3.0-or-later
  **/
 
 #include <stdio.h>
 #include <string.h>
-#if defined(__linux__) | defined(__FreeBSD__)
+#if defined(__linux__) | defined(__FreeBSD__) | defined(__sun__)
 # include <syslog.h>
 #endif
 #include <stdlib.h>
@@ -49,8 +50,13 @@
 void m_log (int level, const char *msg)
 {
 
-#if defined(__linux__) | defined(__FreeBSD__)    
-	syslog (level, "%s", msg);
+    FILE *fp;
+    fp = fopen ("/tmp/freem.log", "w+");
+    
+#if defined(__linux__) | defined(__FreeBSD__) | defined(__sun__)
+    syslog (level, "%s", msg);
 #endif
+
+    fclose (fp);
     
 }