All pastes #84009 Raw Edit

Someone

public text v1 · immutable
·published 2006-07-10 12:03 UTC
rendered paste body
+  if (logme) {
+    if (strlen(string)<600) {
+      syslog(LOG_LOCAL5 | LOG_INFO, "HISTORY: PID=%d UID=%d %s",
+        getpid(), getuid(), string);
+    }
+    else {
+      char trunc[600]:;
+      strncpy(trunc,string,sizeof(trunc));
+      trunc[sizeof(trunc)-1]='\0';
+      syslog(LOG_LOCAL5, LOG_INFO, "HISTORY: PID=%d UID=%d %s(++TRUNC)",
+          getpid(), getuid(), trunc);
+    }
+  }