SKKU-ESLAB / opel-alpha

Open Platform Event Logger (OPEL) Project
Other
3 stars 0 forks source link

Unified Log System #179

Open RedCarrottt opened 7 years ago

RedCarrottt commented 7 years ago

In OPEL Beta 1 Release 2, each sub-system in OPEL uses fragmented log system.

This 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 and sensfw_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 to inc/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).

LeeHayun commented 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?

RedCarrottt commented 7 years ago

How about the 2nd option?

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
RedCarrottt commented 7 years ago

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.