Review Board 1.7.16


log Asterisk Version number, Build etc into log file

Review Request #1409 - Created Sept. 2, 2011 and submitted

Alec Davis
trunk
Reviewers
asterisk-dev
Asterisk
When the question is asked what was the last version that worked? You'd of thought looking through the logs it would be reported.
asterix:/var/log/asterisk# head messages
Asterisk SVN-trunk-r333838M built by root @ asterix on a i686 running Linux on 2011-05-27 11:52:02 UTC
[2011-09-05 21:13:25.672533] NOTICE[27089] loader.c: 1 modules will be loaded.
[2011-09-05 21:13:25.693952] WARNING[27089] http.c: Got 1 addresses

Diff revision 4

This is not the most recent revision of the diff. The latest diff is revision 5. See what's changed.

1 2 3 4 5
1 2 3 4 5

  1. trunk/main/logger.c: Loading...
trunk/main/logger.c
Revision 333893 New Change
[20] 45 lines
[+20] [+] ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
46
#include "asterisk/threadstorage.h"
46
#include "asterisk/threadstorage.h"
47
#include "asterisk/strings.h"
47
#include "asterisk/strings.h"
48
#include "asterisk/pbx.h"
48
#include "asterisk/pbx.h"
49
#include "asterisk/app.h"
49
#include "asterisk/app.h"
50
#include "asterisk/syslog.h"
50
#include "asterisk/syslog.h"

    
   
51
#include "asterisk/buildinfo.h"

    
   
52
#include "asterisk/ast_version.h"
51

    
   
53

   
52
#include <signal.h>
54
#include <signal.h>
53
#include <time.h>
55
#include <time.h>
54
#include <sys/stat.h>
56
#include <sys/stat.h>
55
#include <fcntl.h>
57
#include <fcntl.h>
[+20] [20] 225 lines
[+20] [+] static struct logchannel *make_logchannel(const char *channel, const char *components, int lineno)
281
			ast_console_puts_mutable("': ", __LOG_ERROR);
283
			ast_console_puts_mutable("': ", __LOG_ERROR);
282
			ast_console_puts_mutable(strerror(errno), __LOG_ERROR);
284
			ast_console_puts_mutable(strerror(errno), __LOG_ERROR);
283
			ast_console_puts_mutable("'\n", __LOG_ERROR);
285
			ast_console_puts_mutable("'\n", __LOG_ERROR);
284
			ast_free(chan);
286
			ast_free(chan);
285
			return NULL;
287
			return NULL;

    
   
288
		} else {

    
   
289
			fprintf(chan->fileptr, "Asterisk %s built by %s @ %s on a %s running %s on %s\n",

    
   
290
				ast_get_version(), ast_build_user, ast_build_hostname,

    
   
291
				ast_build_machine, ast_build_os, ast_build_date);

    
   
292
			fflush(chan->fileptr);
286
		}
293
		}
287
		chan->type = LOGTYPE_FILE;
294
		chan->type = LOGTYPE_FILE;
288
	}
295
	}
289
	chan->logmask = make_components(chan->components, lineno);
296
	chan->logmask = make_components(chan->components, lineno);
290

    
   
297

   
[+20] [20] 1376 lines
  1. trunk/main/logger.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.