Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Conversation

@krocard
Copy link
Contributor

@krocard krocard commented Aug 25, 2015

Port log rework (#87) from next in order to remove dependencies on *sprintf that does not have the same behavior on windows.

Additionally fixed a leak introduced by #87 (port make_unique for that)

  

clero added 14 commits April 14, 2015 17:22
Signed-off-by: Jules Clero <julesx.clero@intel.com>
Some elements are logging but ParameterMgr is able
to do the same.
This patch lets the ParameterMgr handle logging
whenever it's possible.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
String lists are often used as containers for function results.
To avoid copy paste, this patch introduces the Results type
to replace std::list<std::string> when relevant.
Documentation has been updated on modified prototype.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
This log is meaningless, as we know subsystems we are
attempting to load. We log only if there is an error.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
Signed-off-by: Jules Clero <julesx.clero@intel.com>
This log information is easy to retrieve by looking
the structure file.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
The client may choose if he wants to log the error
when adding a criterion.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
In prevision of logging rework, this patch
removes logging from plugins.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
uint8_t type seems to be buggy when we try to log it through stream API.
This patch uses uint32_t type instead to count criterion modifications.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
Logs were provided by Element god class. This patch
moves logging in the log library which is used by
the ParameterMgr.
Logs remains almost identical from before.
Context title after context closing bracket has been
removed to enhance readability.

Change-Id: Ic7dca65c3cc88eb06a1883c4fb01af9809b19e42
Signed-off-by: Jules Clero <julesx.clero@intel.com>
Signed-off-by: Jules Clero <julesx.clero@intel.com>
Plugins are now able to log.
An ILogger object is provided to plugins to do that.

Signed-off-by: Jules Clero <julesx.clero@intel.com>
Signed-off-by: Jules Clero <julesx.clero@intel.com>
Change-Id: Ib31547b3f899f96b837ac125ea7b0feb8c946760
Signed-off-by: Jules Clero <julesx.clero@intel.com>
@krocard krocard changed the title Port log rework from next [WIP] Port log rework from next Aug 25, 2015
@krocard krocard force-pushed the port_log_from_next branch from a092854 to 939da49 Compare August 26, 2015 16:02
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not be in this pull request

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@krocard krocard force-pushed the port_log_from_next branch from 939da49 to 0ad5644 Compare August 26, 2015 16:17
@krocard
Copy link
Contributor Author

krocard commented Aug 26, 2015

@dawagner @OznOg please review.

@krocard krocard changed the title [WIP] Port log rework from next Port log rework from next Aug 26, 2015
@krocard krocard mentioned this pull request Aug 26, 2015
@krocard krocard force-pushed the port_log_from_next branch 2 times, most recently from 2745788 to 0ad5644 Compare August 26, 2015 16:57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not be virtual?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

@OznOg
Copy link
Contributor

OznOg commented Aug 27, 2015

👎

@krocard krocard force-pushed the port_log_from_next branch 2 times, most recently from fb11d68 to 0d577c3 Compare August 28, 2015 09:18
Port log rework from next in order to remove dependancies on snprintf
and because it was pending.

Conflicts:
	parameter/Android.mk
	parameter/ConfigurableDomain.cpp
	parameter/ConfigurableDomains.cpp
	parameter/Element.cpp
	parameter/Element.h
	parameter/ParameterMgr.cpp
	parameter/ParameterMgr.h
	parameter/SelectionCriterion.cpp
	parameter/SubsystemObject.cpp
	parameter/SubsystemObject.h
	parameter/SystemClass.cpp
	utility/CMakeLists.txt
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
std::make_unique is a function that alocates an object and
wraps it in a std::unique_ptr. This helper function
is very useful for unique_ptr manibulation.
Unfortunately the proposal missed the C++11 time frame and
was adopted in C++14.

As is implementation is very straightforward, port it in the
PF.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Fix the leak by managing the object life cycle with
an unique_ptr.

Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
@krocard krocard force-pushed the port_log_from_next branch from 0d577c3 to 161bfb1 Compare August 28, 2015 09:28
krocard added a commit that referenced this pull request Aug 28, 2015
Port log rework (#87) from next in order to remove dependencies on `*sprintf` that does not have the same behavior on windows.

Additionally fixed a leak introduced by #87 (port make_unique for that)
@krocard krocard merged commit 005c390 into intel:windows_port Aug 28, 2015
@krocard krocard deleted the port_log_from_next branch August 28, 2015 09:34
@dawagner dawagner added this to the Windows port milestone Sep 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants