Open RedCarrottt opened 7 years ago
Good!
We have already decided to divide by three logs as shown below.
I also want to suggest ways to distinguish each framework. For example)
What do you think about this?
How about the 2nd option?
OPEL_LOG_ERR (CAM, "~~~")
We can define each framework's identifier in the inc/OPELLog.h
file as following.
#define CAMERA "Camera"
#define APPCORE "AppCore"
#define SENSOR "Sensor"
Finally, following result is expected. (such as Android Logcat message)
[E/Camera] Error Message
At first, 3rd option is the worst option since it makes strong coupling with each framework's name.
1st option deserves consideration. However, if we want to add a new framework, we should make new macro functions for the framework. It needs a few more works than 2nd option.
In OPEL Beta 1 Release 2, each sub-system in OPEL uses fragmented log system.
printf
printf
OPELdbugLog.h
+ littleprintf
callscmfw_log.h
sensfw_log.h
+ manyprintf
callsThis system has no information on log leveling nor error source.
In result, we have to meet too messy log messages on bug-reporting, testing or debugging. It is too inefficient! It usually hinders the development of OPEL.
Therefore, I propose to implement unified log system based on
OPELdbugLog.h
.Although
cmfw_log.h
,OPELdbugLog.h
andsensfw_log.h
have similar code,OPELdbugLog.h
has the functionality of log leveling and error source logging.Therefore, I propose to move and rename
src/camera-manager/inc/OPELdbugLog.h
toinc/OPELLog.h
.OPELLog
should be modified to have parameter to pass which manager the log message is belonged.I think this issue should be handled in Beta 2 (#144).