version 1.12, 2025/04/15 16:49:36
|
version 1.14, 2025/05/14 12:22:04
|
Line 24
|
Line 24
|
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
* |
* |
* $Log$ |
* $Log$ |
|
* Revision 1.14 2025/05/14 12:22:04 snw |
|
* Further work on shared memory |
|
* |
|
* Revision 1.13 2025/04/16 17:36:12 snw |
|
* Add FreeBSD shm cleanup script |
|
* |
* Revision 1.12 2025/04/15 16:49:36 snw |
* Revision 1.12 2025/04/15 16:49:36 snw |
* Make use of logprintf throughout codebase |
* Make use of logprintf throughout codebase |
* |
* |
Line 75
|
Line 81
|
#include "log.h" /* for logging constants */ |
#include "log.h" /* for logging constants */ |
#include "init.h" /* for cleanup() */ |
#include "init.h" /* for cleanup() */ |
#include "iniconf.h" /* for read_profile_string() */ |
#include "iniconf.h" /* for read_profile_string() */ |
|
#include "shmmgr.h" /* for shm_exit() */ |
|
|
short log_threshold_file; |
short log_threshold_file; |
short log_threshold_syslog; |
short log_threshold_syslog; |
Line 277 void m_log(int level, const char *msg)
|
Line 284 void m_log(int level, const char *msg)
|
strftime (timeval, sizeof (timeval) - 1, "%F %T", logtime); |
strftime (timeval, sizeof (timeval) - 1, "%F %T", logtime); |
fprintf (fp, "%s [LEVEL %s PID %ld]: %s\n", timeval, lvl, getpid (), msg); |
fprintf (fp, "%s [LEVEL %s PID %ld]: %s\n", timeval, lvl, getpid (), msg); |
fclose (fp); |
fclose (fp); |
} |
} |
} |
} |
|
|
#if defined(__linux__) | defined(__FreeBSD__) | defined(__sun__) |
#if defined(__linux__) | defined(__FreeBSD__) | defined(__sun__) |