diff --git a/src/StreamEpics.cc b/src/StreamEpics.cc index 9117fd9..6c2610b 100644 --- a/src/StreamEpics.cc +++ b/src/StreamEpics.cc @@ -180,6 +180,7 @@ public: #ifndef EPICS_3_13 extern "C" { epicsExportAddress(int, streamDebug); +epicsExportAddress(int, streamError); } #endif diff --git a/src/StreamError.cc b/src/StreamError.cc index 8b36a41..e5d38d1 100644 --- a/src/StreamError.cc +++ b/src/StreamError.cc @@ -23,6 +23,7 @@ #include int streamDebug = 0; +int streamError = 0; extern "C" { #ifdef _WIN32 __declspec(dllexport) @@ -74,6 +75,7 @@ void StreamError(int line, const char* file, const char* fmt, ...) void StreamVError(int line, const char* file, const char* fmt, va_list args) { char timestamp[40]; + if (!streamError) return; // Error logging disabled StreamPrintTimestampFunction(timestamp, 40); #ifdef va_copy if (StreamDebugFile) diff --git a/src/StreamError.h b/src/StreamError.h index 497cf79..be39323 100644 --- a/src/StreamError.h +++ b/src/StreamError.h @@ -28,6 +28,7 @@ #endif extern int streamDebug; +extern int streamError; extern void (*StreamPrintTimestampFunction)(char* buffer, int size); void StreamError(int line, const char* file, const char* fmt, ...) diff --git a/src/makedbd.pl b/src/makedbd.pl index cf10544..97ba29e 100644 --- a/src/makedbd.pl +++ b/src/makedbd.pl @@ -2,6 +2,7 @@ if (@ARGV[0] == "-3.13") { shift; } else { print "variable(streamDebug, int)\n"; + print "variable(streamError, int)\n"; print "registrar(streamRegistrar)\n"; } print "driver(stream)\n";