Disable error messages by default in order to prevent filling the log. Set variable streamDebug to 1 to enable error messages.
This commit is contained in:
@ -180,6 +180,7 @@ public:
|
|||||||
#ifndef EPICS_3_13
|
#ifndef EPICS_3_13
|
||||||
extern "C" {
|
extern "C" {
|
||||||
epicsExportAddress(int, streamDebug);
|
epicsExportAddress(int, streamDebug);
|
||||||
|
epicsExportAddress(int, streamError);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int streamDebug = 0;
|
int streamDebug = 0;
|
||||||
|
int streamError = 0;
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
__declspec(dllexport)
|
__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)
|
void StreamVError(int line, const char* file, const char* fmt, va_list args)
|
||||||
{
|
{
|
||||||
char timestamp[40];
|
char timestamp[40];
|
||||||
|
if (!streamError) return; // Error logging disabled
|
||||||
StreamPrintTimestampFunction(timestamp, 40);
|
StreamPrintTimestampFunction(timestamp, 40);
|
||||||
#ifdef va_copy
|
#ifdef va_copy
|
||||||
if (StreamDebugFile)
|
if (StreamDebugFile)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int streamDebug;
|
extern int streamDebug;
|
||||||
|
extern int streamError;
|
||||||
extern void (*StreamPrintTimestampFunction)(char* buffer, int size);
|
extern void (*StreamPrintTimestampFunction)(char* buffer, int size);
|
||||||
|
|
||||||
void StreamError(int line, const char* file, const char* fmt, ...)
|
void StreamError(int line, const char* file, const char* fmt, ...)
|
||||||
|
@ -2,6 +2,7 @@ if (@ARGV[0] == "-3.13") {
|
|||||||
shift;
|
shift;
|
||||||
} else {
|
} else {
|
||||||
print "variable(streamDebug, int)\n";
|
print "variable(streamDebug, int)\n";
|
||||||
|
print "variable(streamError, int)\n";
|
||||||
print "registrar(streamRegistrar)\n";
|
print "registrar(streamRegistrar)\n";
|
||||||
}
|
}
|
||||||
print "driver(stream)\n";
|
print "driver(stream)\n";
|
||||||
|
Reference in New Issue
Block a user