#include <time.h> #ifndef NONAMESPACE #include <iostream> #include <fstream> using namespace std; #else #include <iostream.h> #include <fstream.h> #endif #include <string> #include "extremes.h" #include "funcnames.h" #include "pidhash.h" #include "log.h" #include "args.h" #include "usage.h" int main( int argc, char **argv ); int main( int argc, char **argv ) { bool usage; bool detail; string filename; time_t begints; time_t endts; int rc; Log log; if( rc = ParseArgs( argc, argv, &usage, &detail, &begints, &endts, &filename ) ) return rc; if( usage ) { PrintUsage(); } else { if( rc = PrintArgs( detail, begints, endts, filename ) ) return rc; if( rc = log.SetFilename( filename ) ) return rc; if( !( rc = log.Open() ) ) { if( detail ) cout << "\n"; if( rc = log.Process( detail, begints, endts ) ) return rc; if( rc = log.Close() ) return rc; } else { cout << "Couldn't open p4d server log!\n"; cout << "Perhaps p4loga --help for more information?\n"; return rc; } } return 0; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 4955 | Michael Shields | Abstract out Log class. | ||
#3 | 4630 | Michael Shields |
Throw away garbage in the log resulting from p4d bug 15356. Such garbage will no longer prematurely terminate p4loga. |
||
#2 | 1722 | Michael Shields |
p4loga builds for freebsd4 (play), hpux11 (hell), linux24x86 (duey), and solaris26 (shucks). A bit of porting was required for the hpux11 build (aCC as configured on hell isn't quite up to speed with respect to namespaces). |
||
#1 | 1610 | Michael Shields |
Adding p4d log analyzer concocted by myself. Compiles and executes on Red Hat 6.0, 7.0, and probably a few other operating systems with perhaps a little help. Still needs comments. |