-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable logging outside of local domain, with no other changes #644
Conversation
supersedes #643 |
This seems to be working OK in DEV. My understanding is that this PR needs to be back-propagated into any in-use libraries. I suggest to tag the following for now, and I'll begin the re-compilations on SDCC. |
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
The patch worked fine with SL23 but there were conflicts with SL22 and SL21 branches. For these branches, I forced the incoming changes over the existing ones. I don't think our CI will be able to catch potential problems with the online code should they happen. If there is a way to test the patched branches before we merge them, please let me know. |
@plexoos What are the conflicts? Are this git conflicts or compile conflicts? |
A conflict when the patch is applied. Here, for example, diff --git a/StRoot/RTS/src/rtsmakefile.def b/StRoot/RTS/src/rtsmakefile.def
index b22ce170a7..e65f702e75 100755
--- a/StRoot/RTS/src/rtsmakefile.def
+++ b/StRoot/RTS/src/rtsmakefile.def
@@ -372,8 +374,46 @@ endif
DEFINES = -D_REENTRANT ${RTS_DAQMAN_FLAGS} -DRTS_HOST_NAME=\"${HOST_NAME}\" -DTARGET_SYSTEM=\"${TARGET_SYSTEM}\" -DPROJDIR=\"${PROJDIR}\" -DINSTALL_SUFFIX=\"${INSTALL_SUFFIX}\" -D${RTS_TYPE} ${HOW} ${HOSTDEFINES} -DRTS_ONLINE
+<<<<<<< HEAD
BASEFLAGS = -O3 -Wall -pipe -fverbose-asm ${HOSTFLAGS}
#BASEFLAGS= -Wall -pipe -fverbose-asm ${HOSTFLAGS}
+=======
+# Set strict errors in LINUX
+BASEFLAGS = -O3 -Wall -Wno-error=strict-overflow -Wno-error=maybe-uninitialized -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS}
+
+
+#-O3
+ifneq (${TARGET_SYSTEM}, LINUX)
+ BASEFLAGS = -Wall -pipe -fverbose-asm ${HOSTFLAGS}
+endif
+
+ifeq (${HOST_NAME},xvme01.daq.bnl.local)
+ BASEFLAGS = -O3 -Wall -Wno-error=strict-overflow -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS}
+endif
+
+# if not compiling on one of the standard domains, then
+# use the default log destination of std_err
+# if compiling on local domain, write to daqman
+#
+# if compiling somewhere else for writing to daqman these defines
+ifeq (${HOSTDOMAIN},starp.bnl.gov)
+ DEFINES += -DRTS_LOG_DEFAULT_NET
+ DEFINES += -DRTS_ENABLE_LOG
+else ifeq (${HOSTDOMAIN},daq.bnl.local)
+ DEFINES += -DRTS_LOG_DEFAULT_NET
+ DEFINES += -DRTS_ENABLE_LOG
+else ifeq (${HOSTDOMAIN},daq2.bnl.local)
+ DEFINES += -DRTS_LOG_DEFAULT_NET
+ DEFINES += -DRTS_ENABLE_LOG
+else ifeq (${HOSTDOMAIN},trg.bnl.local)
+ DEFINES += -DRTS_LOG_DEFAULT_NET
+ DEFINES += -DRTS_ENABLE_LOG
+else ifeq (${HOSTDOMAIN},l4.bnl.local)
+ DEFINES += -DRTS_LOG_DEFAULT_NET
+ DEFINES += -DRTS_ENABLE_LOG
+endif
+
+>>>>>>> 2ffb8a419a (Disable logging outside of local domain, with no other changes (#644))
CCFLAGS = ${BASEFLAGS} ${USRCCFLAGS} ${DEFINES} ${INCLUDES}
CXXFLAGS = ${BASEFLAGS} ${USRCXXFLAGS} ${DEFINES} ${INCLUDES}
CFLAGS = ${BASEFLAGS} ${USRCFLAGS} ${DEFINES} ${INCLUDES} |
diff --git a/StRoot/RTS/src/LOG/rtsLogUnix.c b/StRoot/RTS/src/LOG/rtsLogUnix.c
index c48799c7d8..3083e23858 100755
--- a/StRoot/RTS/src/LOG/rtsLogUnix.c
+++ b/StRoot/RTS/src/LOG/rtsLogUnix.c
@@ -29,7 +29,35 @@ extern "C" {
volatile int tonkoLogLevel = 2 ;
+<<<<<<< HEAD
static char *getCmd(void) ;
+=======
+
+
+
+
+#ifdef RTS_ENABLE_LOG
+#warning "DAQ logging is enabled"
+#ifdef RTS_LOG_DEFAULT_NET
+#warning "DAQ logging defaults to daqman"
+#else
+#warning "DAQ logging defaults to STDERR"
+#endif /* RTS_LOG_DEFAULT_NET */
+#else
+#warning "DAQ logging is disabled"
+#endif /* RTS_ENABLE_LOG */
+
+
+#ifdef RTS_ENABLE_LOG
+
+#ifdef RTS_LOG_DEFAULT_NET
+static int output_flag = RTS_LOG_NET ;
+#else
+static int output_flag = RTS_LOG_STDERR ;
+#endif
+
+static const char *getCmd(void) ;
+>>>>>>> 2ffb8a419a (Disable logging outside of local domain, with no other changes (#644))
static int odesc = -1 ;
static int handchange ;
static FILE *fdesc = 0 ;
@@ -328,9 +355,13 @@ int rtsLogUnix_v(const char *str, ...)
return 0 ;
}
+<<<<<<< HEAD
static char *getCmd(void)
+=======
+static const char *getCmd(void)
+>>>>>>> 2ffb8a419a (Disable logging outside of local domain, with no other changes (#644))
{
|
I don't understand how these patches map on the changes that were made, which were simple. Maybe git has trouble with the ifdefs. There are only 2 files that are part of the offline compile: rtsLog.h and rtsLogUnix.c. It doesn't look like these have changed since 2019 in our repository, so I don't know why this is occurring. In any event the files should override whatever exists. There aren't multiple branches or anything like that to get confused by. |
Co-authored-by: jml985 <[email protected]>
Co-authored-by: jml985 <[email protected]>
Co-authored-by: jml985 <[email protected]>
Clean version of the pull request disabling DAQ logging when compiling outside of the local domain. Co-authored-by: jml985 <[email protected]>
Clean version of the pull request disabling DAQ logging when compiling outside of the local domain. Co-authored-by: jml985 <[email protected]>
Co-authored-by: jml985 <[email protected]>
Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
For the record, the following branches have been patched and tagged respectively (#644 (comment)): SL21c_9, SL21d_4 |
…bnl#644) Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.
Clean version of the pull request disabling DAQ logging when compiling outside of the local domain.