[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/icecream/icecream
From: Stephan Kulow <coolo () kde ! org>
Date: 2004-08-31 16:54:06
Message-ID: 20040831165406.93BA42A06 () office ! kde ! org
[Download RAW message or body]
CVS commit by coolo:
trying to make sense of the log files
M +2 -0 daemon/main.cpp 1.103
M +11 -2 services/logging.h 1.8
--- kdenonbeta/icecream/icecream/daemon/main.cpp #1.102:1.103
@@ -659,4 +659,6 @@ int main( int argc, char ** argv )
if ( msg )
current_kids--;
+ else
+ log_error() << "catched child pid " << child << " not in my map\n";
jobmap.erase( child );
Pidmap::iterator pid_it = pidmap.find( child );
--- kdenonbeta/icecream/icecream/services/logging.h #1.7:1.8
@@ -35,4 +35,13 @@ extern std::ostream *logfile_trace;
void setup_debug(int level, const std::string &logfile = "");
+inline std::ostream & output_date( std::ostream &os )
+{
+ time_t t = time( 0 );
+ char *buf = ctime( &t );
+ buf[strlen( buf )-1] = 0;
+ os << "[" << buf << "] ";
+ return os;
+}
+
static inline std::ostream& log_info() {
assert( logfile_info );
@@ -42,10 +51,10 @@ static inline std::ostream& log_info() {
static inline std::ostream& log_warning() {
assert( logfile_warning );
- return *logfile_warning;
+ return output_date( *logfile_warning );
}
static inline std::ostream& log_error() {
assert( logfile_error );
- return *logfile_error;
+ return output_date( *logfile_error );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic