Lines Matching defs:log

22   sc_report -- test error reporting, sepcifically log file
24 That that messages are printed into the log file.
55 sc_report_handler::report( SC_INFO, "ID1", "after log is opened", "method", 101);
56 sc_report_handler::report( SC_WARNING, "ID2", "after log is opened", "method", 102);
57 sc_report_handler::report( SC_ERROR, "ID1", "after log is opened", "method", 103);
58 sc_report_handler::report( SC_FATAL, "ID2", "after log is opened", "method", 104);
62 sc_report_handler::report( SC_INFO, "ID2", "after log is opened", "thread", 201);
63 sc_report_handler::report( SC_WARNING, "ID1", "after log is opened", "thread", 202);
64 sc_report_handler::report( SC_ERROR, "ID2", "after log is opened", "thread", 203);
65 sc_report_handler::report( SC_FATAL, "ID1", "after log is opened", "thread", 204);
73 const char fname[] = "./sc_report.log";
83 // produces messages before the log file is opened
84 sc_report_handler::report( SC_INFO, "ID1", "before log is opened", "no_file", 0);
85 sc_report_handler::report( SC_WARNING, "ID1", "before log is opened", "no_file", 0);
87 // open log file
92 sc_report_handler::report( SC_INFO, "ID1", "after log is opened", "file1", 1);
93 sc_report_handler::report( SC_WARNING, "ID2", "after log is opened", "file2", 2);
94 sc_report_handler::report( SC_ERROR, "ID1", "after log is opened", "file3", 3);
95 sc_report_handler::report( SC_FATAL, "ID2", "after log is opened", "file4", 4);
101 sc_report_handler::report( SC_ERROR, "ID1", "after log is opened", "file3", 5);
104 // close log file and more messages
107 sc_report_handler::report( SC_INFO, "ID1", "after log is closed", "no_file", 0);
108 sc_report_handler::report( SC_WARNING, "ID1", "after log is closed", "no_file", 0);
112 FILE* log = fopen( fname,"r" );
113 if ( !log ) {
114 SC_REPORT_FATAL( "Can not open the sc_report log file: ", fname );
118 int c = fgetc(log);
123 fclose( log) ;