[1] UltraMonkey-L7 (v3.1.2-1) | 2014-09-19 11:41 |
[2] UltraMonkey(L4) () | 2019-09-26 18:24 |
[3] SSL Proxy (1.0.2-0) | 2009-08-24 23:30 |
[4] Resource Agents for Heartbeat2 (SSL Proxy RA for Heartbeat 2.1.4) | 2010-09-22 11:14 |
log4cxx (0.10.0-1) | 2012-11-09 15:27 |
---
Debugで出力するLogは基本的に以下の情報を出力する。
以下必要な情報は随時追加
---
---
example.
- int foo( int integer, char* name, struct sct_t* t ){
- int* ptr = NULL;
- if( DEBUG == get_log_level() ){
- char buf[256];
- memset( buf, NULL, sizeof(buf) );
- sprintf( buf, "function foo(int, char* struct sct_t* ) in "
- " int value = %d "
- " char* value = %s"
- " struct sct_t* address = %x"
- " sct_t.x = %d "
- " sct_t.y = %d " ,
- integer, name, (intptr_t) t, t->x, t->y );
- logputDEBUG( CATEGORY_LOGIC, buf );
- }
- ptr = malloc( sizeof(int) );
- if( DEBUG == get_log_level() ){
- char buf[256];
- memset( buf, NULL, sizeof(buf) );
- sprintf( buf, "memory allocate address: %x, size :%d" , (intptr_t) ptr, sizeof(int) );
- logputDEBUG( CATEGORY_LOGIC, buf );
- }
- if( !ptr ){
- logputERROR( "don't allocate memory" );
- if( DEBUG == get_log_level() ) logputDEBUG( "function foo() return -1" );
- return -1;
- }
- free( ptr );
- if( DEBUG == get_log_level() ){
- logputDEBUG( "memory free address: %x, size :%d", (intptr_t) ptr, sizeof(int) );
- logoutDEBUG( "return function foo() return 0" );
- }
- return 0;
- }
[PageInfo]
LastUpdate: 2007-11-28 15:15:23, ModifiedBy: anonymous
[License]
GNU Free Documentation License
[Permissions]
view:all, edit:all, delete/config:all