Support logging configuration in OpenContrail
Presently much of the logging configuration in both C++ modules and Python modules
are hard coded. This blueprint proposes the mechanism to support logging configuration.
Python modules
---------------
This blueprint proposes
1. to provide the modular mechanism to use other third party logging libraries like oslo.log or to define new ones.
2. Enhance the sandesh logger to reading the logging parameters (like handlers, formatters etc) from the configuration file
The below approach can be taken to implement the suggested features.
a. A base sandesh logger (SandeshBaseLogger) class needs to be defined
b. sandesh_
c. External logging library should derive from SandeshBaseLogger class.
d. External logging library needs to be outside the OpenContrail source tree and can be a pip package.
d. The class name of the thirty party logging libraries has to be defined in a configuration file (eg. contrail-api.conf)
e. class name needs to be passed to sandesh_
f. Sandesh object needs to call a factory method (eg. SandeshBaseLogg
g. If external class name is not defined in the configuration file, then sandesh_
h. Enhance the sandesh_
C++ modules
------------
The logging module needs to be enhanced to read the logging parameters like log handlers, file size, enable syslog etc from configuration files.
Draft code is available here
-------
https:/
https:/
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Numan Siddique
- Direction:
- Needs approval
- Assignee:
- Numan Siddique
- Definition:
- Review
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Nman Siddique has indicated that he cannot continue work on this blueprint.