From: Alexander P. <ale...@us...> - 2008-01-31 12:05:37
|
Update of /cvsroot/firebird/firebird2/src/jrd/os/posix In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8490/jrd/os/posix Modified Files: fbsyslog.cpp Log Message: Make syslog interface as light as possible Index: fbsyslog.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/jrd/os/posix/fbsyslog.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -b -U3 -r1.6 -r1.7 --- fbsyslog.cpp 26 Jul 2006 09:27:01 -0000 1.6 +++ fbsyslog.cpp 31 Jan 2008 12:04:55 -0000 1.7 @@ -24,9 +24,10 @@ #include <syslog.h> #include <unistd.h> +#include <string.h> namespace Firebird { -void Syslog::Record(Severity level, const string& Msg) +void Syslog::Record(Severity level, const char* Msg) { int priority = LOG_ERR; switch (level) { @@ -38,7 +39,7 @@ priority = LOG_ERR; break; } - syslog(priority | LOG_LOCAL3, "%s (%m)", Msg.c_str()); + syslog(priority | LOG_LOCAL3, "%s (%m)", Msg); // try to put it also on controlling tty int fd = 2; @@ -48,7 +49,7 @@ } if (isatty(fd)) { - write(fd, Msg.c_str(), Msg.length()); + write(fd, Msg, strlen(Msg)); write(fd, "\n", 1); } } |