4bfc868fa3
compatible / memcached, and has more features(as follows): * persistent storage (you can use flare as persistent memcached) * pluggable storage (currently only Tokyo Cabinet is available, though:) * data replication (synchronous or asynchronous) * data partitioning (automatically partitioned according to # of master servers (clients do not have to care about it)) * dynamic reconstruction, and partitioning (you can dynamically (I mean, without any service interruption) add slave servers and partition master servers) * node monitoring and failover (if any server is down, the server is automatically isolated from active servers and another slave server is promoted to master server) * request proxy (you can always get same result regardless of servers you connect to. so you can think flare servers as one big key-value storage) * over 256 bytes keys, and over 1M bytes values are available WWW: http://labs.gree.jp/Top/OpenSource/Flare-en.html
74 lines
3.1 KiB
C++
74 lines
3.1 KiB
C++
--- src/lib/logger.cc.orig 2009-10-09 19:08:47.000000000 +0900
|
|
+++ src/lib/logger.cc 2010-05-29 10:05:44.216154429 +0900
|
|
@@ -69,7 +69,7 @@
|
|
*/
|
|
void logger::emerg(const char* file, const int line, const char* func, const char *format, ...) {
|
|
ostringstream s;
|
|
- s << "[" << (unsigned int)pthread_self() << "][EMG][" << file << ":" << line << "-" << func << "] ";
|
|
+ s << "[" << (unsigned long)pthread_self() << "][EMG][" << file << ":" << line << "-" << func << "] ";
|
|
|
|
char buf[1024];
|
|
va_list op;
|
|
@@ -85,7 +85,7 @@
|
|
*/
|
|
void logger::alert(const char* file, const int line, const char* func, const char *format, ...) {
|
|
ostringstream s;
|
|
- s << "[" << (unsigned int)pthread_self() << "][ALT][" << file << ":" << line << "-" << func << "] ";
|
|
+ s << "[" << (unsigned long)pthread_self() << "][ALT][" << file << ":" << line << "-" << func << "] ";
|
|
|
|
char buf[1024];
|
|
va_list op;
|
|
@@ -101,7 +101,7 @@
|
|
*/
|
|
void logger::crit(const char* file, const int line, const char* func, const char *format, ...) {
|
|
ostringstream s;
|
|
- s << "[" << (unsigned int)pthread_self() << "][CRT][" << file << ":" << line << "-" << func << "] ";
|
|
+ s << "[" << (unsigned long)pthread_self() << "][CRT][" << file << ":" << line << "-" << func << "] ";
|
|
|
|
char buf[1024];
|
|
va_list op;
|
|
@@ -117,7 +117,7 @@
|
|
*/
|
|
void logger::err(const char* file, const int line, const char* func, const char *format, ...) {
|
|
ostringstream s;
|
|
- s << "[" << (unsigned int)pthread_self() << "][ERR][" << file << ":" << line << "-" << func << "] ";
|
|
+ s << "[" << (unsigned long)pthread_self() << "][ERR][" << file << ":" << line << "-" << func << "] ";
|
|
|
|
char buf[1024];
|
|
va_list op;
|
|
@@ -133,7 +133,7 @@
|
|
*/
|
|
void logger::warning(const char* file, const int line, const char* func, const char *format, ...) {
|
|
ostringstream s;
|
|
- s << "[" << (unsigned int)pthread_self() << "][WRN][" << file << ":" << line << "-" << func << "] ";
|
|
+ s << "[" << (unsigned long)pthread_self() << "][WRN][" << file << ":" << line << "-" << func << "] ";
|
|
|
|
char buf[1024];
|
|
va_list op;
|
|
@@ -149,7 +149,7 @@
|
|
*/
|
|
void logger::notice(const char* file, const int line, const char* func, const char *format, ...) {
|
|
ostringstream s;
|
|
- s << "[" << (unsigned int)pthread_self() << "][NTC][" << file << ":" << line << "-" << func << "] ";
|
|
+ s << "[" << (unsigned long)pthread_self() << "][NTC][" << file << ":" << line << "-" << func << "] ";
|
|
|
|
char buf[1024];
|
|
va_list op;
|
|
@@ -165,7 +165,7 @@
|
|
*/
|
|
void logger::info(const char* file, const int line, const char* func, const char *format, ...) {
|
|
ostringstream s;
|
|
- s << "[" << (unsigned int)pthread_self() << "][INF][" << file << ":" << line << "-" << func << "] ";
|
|
+ s << "[" << (unsigned long)pthread_self() << "][INF][" << file << ":" << line << "-" << func << "] ";
|
|
|
|
char buf[1024];
|
|
va_list op;
|
|
@@ -181,7 +181,7 @@
|
|
*/
|
|
void logger::debug(const char* file, const int line, const char* func, const char *format, ...) {
|
|
ostringstream s;
|
|
- s << "[" << (unsigned int)pthread_self() << "][DBG][" << file << ":" << line << "-" << func << "] ";
|
|
+ s << "[" << (unsigned long)pthread_self() << "][DBG][" << file << ":" << line << "-" << func << "] ";
|
|
|
|
char buf[1024];
|
|
va_list op;
|