2

How can I easily replace the log4cxx for android log?

I'm trying to re-define as:

#define LOG4CXX_INFO(logger, message) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, message)

But a compilation error is showed:

xxxxx.cpp:122:13: error: no match for 'operator<<' in '"Could not open file " << fileName'
Victor
  • 8,309
  • 14
  • 80
  • 129

1 Answers1

0

It is best to write a custom Appender wrapping __android_log_print.

See Log4cxx custom appender.

Community
  • 1
  • 1
auselen
  • 27,577
  • 7
  • 73
  • 114