Classes Logger and PtyLogger in namespace quarks::service are now available from quarks/trunk as of revision 1086 of the repository. PtyLogger is still a little delicate because it assumes that your telnet session is using /dev/pty0. This is normally true unless you start a new session while keeping /dev/pty0 open in your own code. The implementation may also not be thread-safe although the class code itself is reentrant.
Example logging to the telnet socket:
#include "quarks/service/Logger.hh" #include "quarks/service/PtyLogger.hh" using quarks::service::Logger; using quarks::service::PtyLogger; extern "C" void rce_appmain() { // Log to telnetd PTY, filter out severity less than Info. Logging::initLogging(Logger::Info, new PtyLogger()); Logger().info("Hello"); Logger().debug("Extra stuff"); // Filtered out. }
The head of rceapp/trunk/core, starting at revision 1086, makes core.1.2.devel and core.1.2 prod.
The new core contains dprintf() and related functions needed for quarks::service::Logger and related classes. It also has a fix for a bug in long long RceSvc::time().
Today we converted the NPA CVS repository to Subversion. See
https://confluence.slac.stanford.edu/display/CCI/The+Petacache+code+repository
https://confluence.slac.stanford.edu/display/CCI/Source+code+projects+and+packages