Line data Source code
1 : // This file (TLOG.cc) was created by Ron Rechenmacher <ron@fnal.gov> on
2 : // Jan 20, 2021. "TERMS AND CONDITIONS" governing this file are in the README
3 : // or COPYING file. If you do not have such a file, one can be obtained by
4 : // contacting Ron or Fermi Lab in Batavia IL, 60510, phone: 630-840-3000.
5 : // $RCSfile: .emacs.gnu,v $
6 : // rev="$Revision: 1.34 $$Date: 2019/04/22 15:23:54 $";
7 : /*
8 : # try:
9 : treset; TLOG; tshow | PAGER= tdelta -ct 1
10 : */
11 : #include "TRACE/trace.h"
12 :
13 0 : int main(/*int argc, char *argv[]*/)
14 : {
15 0 : TLOG() << "hello - TLOG() - no args - lvl defaults to new (new-ish) \"LOG\" level";
16 0 : TLOG(TLVL_INFO) << "hello - TLOG(TLVL_INFO) - lvl arg";
17 0 : TLOG("TEST_INFO", TLVL_INFO) << "hello - TLOG(\"TEST_INFO\",TLVL_INFO) - lvl and name args, name first";
18 :
19 : // RECALL -- if no non-string args, no problem
20 0 : TLOG(TLVL_LOG, 1) << "hi - TLOG(TLVL_LOG,1) - always a msg (w/ non-str arg) w/ % as in %MSG " << 1;
21 0 : uint16_t old_modeS= (uint16_t)TRACE_CNTL("modeS", 0);
22 0 : TLOG(TLVL_LOG, 1) << "hi - TLOG(TLVL_LOG,1) - always a msg (w/ non-str arg) w/ % as in %MSG " << 1;
23 0 : TLOG(TLVL_LOG) << "hi - TLOG(TLVL_LOG) - dly fmt if only fast - a msg w/ % as in %MSG and a non-str arg: " << 1;
24 0 : TRACE_CNTL("modeS", old_modeS);
25 0 : TLOG(TLVL_LOG) << "hi - TLOG(TLVL_LOG) - dly fmt if only fast - a msg w/ % as in %MSG and a non-str arg: " << 1;
26 0 : return (0);
27 : } // main
|