Skip to content
Snippets Groups Projects
Commit 52e649eb authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #5555: Gave generateRSP a log_prop file to prevent logging from...

Task #5555: Gave generateRSP a log_prop file to prevent logging from clobbering the output. For the tests, the -o parameter is used instead to circumvent the same issue.
parent bbfdb330
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ lofar_add_bin_program(printDelays Delays/printDelays.cc)
# install the logprop file
install(FILES
Delays/printDelays.log_prop
Station/generateRSP.log_prop
DESTINATION etc)
configure_file(
......
......@@ -152,8 +152,8 @@ int main(int argc, char **argv)
RSPPacketFactory packetFactory(inStream, boardMode, subbands);
RSP packet;
TimeStamp current(TimeStamp::convert(from, clockmode * 1000000));
TimeStamp end(TimeStamp::convert(to, clockmode * 1000000));
TimeStamp current(TimeStamp::convert(from, boardMode.clockHz()));
TimeStamp end(TimeStamp::convert(to, boardMode.clockHz()));
while(current < end && packetFactory.makePacket(packet, current, boardNr)) {
// Write packet
......
# Note: generateRSP needs to log to stderr, to prevent clobbering its regular
# output on stdout.
# Configure the loggers
log4cplus.rootLogger=INFO, STDERR
log4cplus.logger.TRC=INFO
# prevent debug messages: accept >=WARN only, and don't forward messages to the rootLogger
log4cplus.logger.LCS.ApplCommon=WARN, STDERR
log4cplus.additivity.LCS.ApplCommon=false
log4cplus.logger.LCS.MSLofar=WARN, STDERR
log4cplus.additivity.LCS.MSLofar=false
# Define the appenders
log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
log4cplus.appender.STDOUT.layout.ConversionPattern=printDelays@%h %D{%d-%m-%y %H:%M:%S.%q} %-5p %c{3} - %m [%b:%L]%n
log4cplus.appender.STDERR=log4cplus::ConsoleAppender
log4cplus.appender.STDERR.layout=log4cplus::PatternLayout
log4cplus.appender.STDERR.layout.ConversionPattern=printDelays@%h %D{%d-%m-%y %H:%M:%S.%q} %-5p %c{3} - %m [%b:%L]%n
log4cplus.appender.STDERR.logToStdErr=true
#log4cplus.appender.FILE=log4cplus::RollingFileAppender
#log4cplus.appender.FILE.File=${LOG4CPLUS_LOGFILENAME}.log
#log4cplus.appender.FILE.MaxFileSize=10MB
#log4cplus.appender.FILE.MaxBackupIndex=2
#log4cplus.appender.FILE.layout=log4cplus::PatternLayout
#log4cplus.appender.FILE.layout.ConversionPattern=rtcp:${MPIRANK}@%h %D{%d-%m-%y %H:%M:%S.%q} %-5p %c{3} - %m [%b:%L]%n
log4cplus.appender.DUMP=log4cplus::NullAppender
......@@ -118,7 +118,7 @@ int main()
ofstream ascStream(ascFile.c_str());
generate_input(ascStream, bitMode[b], nrPackets[p], nrSubbands[s]);
command = str(format("../src/generateRSP -b%d -s%d < %s > %s") %
command = str(format("../src/generateRSP -b%d -s%d < %s -o %s") %
bitMode[b] % nrSubbands[s] % ascFile % rspFile);
cout << "Executing command: " << command << endl;
ASSERT(system(command.c_str()) == 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment