If debug and/or trace log is stored to shared memory, the absolute path to file is now /dev/shm/<pid>/skygw_[trace1|debug1].log
This commit is contained in:
VilhoRaatikka
2014-09-29 13:21:26 +03:00
parent fa47bf760a
commit 686d28a1f0
3 changed files with 41 additions and 4 deletions

View File

@ -1955,7 +1955,19 @@ retblock:
return newstr;
}
/**
* Calculate the number of decimal numbers from a size_t value.
*
* @param value value
*
* @return number of decimal numbers of which the value consists of
* value==123 returns 3, for example.
*/
size_t get_decimal_len(
size_t value)
{
return value > 0 ? (size_t) log10 ((double) value) + 1 : 1;
}

View File

@ -192,6 +192,7 @@ int skygw_rwlock_unlock(skygw_rwlock_t* rwlock);
int skygw_rwlock_init(skygw_rwlock_t** rwlock);
int atomic_add(int *variable, int value);
size_t get_decimal_len(size_t s);
EXTERN_C_BLOCK_BEGIN