Notes |
|
(0033663)
|
git
|
2014-10-24 00:09
|
|
Branch CR25418 has been created by Roman Lygin.
SHA-1: c2a717fddbb88b7680181126b955779272a35fe3
Detailed log of new commits:
Author: Roman Lygin
Date: Fri Oct 24 00:08:40 2014 +0400
0025418: Debug output to be limited to OCC development environment
Author: Roman Lygin
Date: Tue Oct 14 08:28:22 2014 +0400
initial commit
|
|
|
|
The fix has been pushed to the repository |
|
|
(0033665)
|
kgv
|
2014-10-24 08:36
|
|
Dear Roman,
your patch conflicts with issue #0025266 integrated to master a week ago. |
|
|
|
Thanks Kirill! What a clash indeed!
I started working on this on the base of 6.8.0 beta and did not rebase before pushing :-(.
Having a single macro (like OCCT_DEVELOPMENT) could be a more efficient way for your development process but this is totally up to you.
At this moment I cannot rebase to current master due to the CRLF conflict issue of a few OCC files (reported to bugmaster and Andrey). Anyway, most likely the branch will be deleted and the tracker will be closed as duplicate. Please stay tuned |
|
|
(0033672)
|
git
|
2014-10-24 10:04
|
|
Branch CR25418_2 has been created by Roman Lygin.
SHA-1: dde1a635639e7b7908ee193a18d8ac4e568b4c0d
Detailed log of new commits:
Author: Roman Lygin
Date: Fri Oct 24 10:03:26 2014 +0400
initial commit
0025418: Debug output to be limited to OCC development environment
|
|
|
|
Rabased after applying hints from Andrey and pushed as the CR25418_2 branch. Only 5 files survived, the rest were dropped in favor of #25266. |
|
|
(0033675)
|
kgv
|
2014-10-24 10:24
|
|
+#if defined(DEB) && defined(OCCT_DEVELOPMENT)
AddPrinter ( new Message_PrinterOStream );
+#endif
What is the point to block every output by default?
Messenger is the proper way to print messages in OCCT, including debug ones (Trace level).
Application should configure printers of default messenger at the very beginning. And there is a straightforward way to remove already assigned ones (e.g. by type, if you don't like Message_PrinterOStream for some reason).
+#if defined(DEB) && defined(OCCT_DEVELOPMENT)
sout << " ... Exception Raised while reading Step File : " << ficnom <<
":\n" << endl;
sout << Standard_Failure::Caught()->GetMessageString();
sout << " ..." << endl;
+#endif
I'm not familiar with StepFile package, but why the reason of the failure should be buried deep inside the algorithm? |
|
|
|
Regarding the Message package:
I believe it should be the opt-in policy, not the opt-out. That is, if you want to subscribe to the messages do this explicitly by Message::DefaultMessenger()->AddPrinter ( new Message_PrinterOStream );
This way it will be consistent with other usages, e.g. in OCAF message drivers and apparently any other output (which is being suppressed by this very fix and #25266).
The OCC developers will not be affected by this change if OCCT_DEVELOPMENT macro is enabled in the development process.
Regarding the StepFile package, frankly, I am not getting your comment, sorry :-\. Anyway the change is just consistent with others, not changing the existing business logic. |
|
|
(0033677)
|
kgv
|
2014-10-24 12:15
(edited on: 2014-10-24 12:17) |
|
> Regarding the StepFile package, frankly, I am not getting your comment, sorry :-\.
> Anyway the change is just consistent with others, not changing the existing business logic.
The difference is that one messages have been previously passed directly to std::cout, and in most cases - clearly for debugging purposes.
While quoted statement have used Messenger interface, and thus have been available to user in GUI application as well.
At the same time Messenger provides priorities which allows to suppress low-priority messages at run-time, not requiring to re-compile OCCT.
Not-only-for-debug messages are better to keep available (with lower priority if make sense), if them do not noticeably affect performance.
> The OCC developers will not be affected by this change
> if OCCT_DEVELOPMENT macro is enabled in the development process.
The strategy of unified macros does not make sense because visualization developer does not care much about bloating messages from OCAF component and vice versa.
Purely debugging outputs should be either removed or escaped by component-specific macros, if them really useful for this particular component maintainer.
|
|
|
(0033679)
|
jgv
|
2014-10-24 12:33
|
|
I agree with Roman that having a single macro (like OCCT_DEVELOPMENT) that enables ALL debug messages is strictly necessary for developers. |
|
|
(0033779)
|
git
|
2014-10-28 17:09
|
|
Branch CR25418_3 has been created by abv.
SHA-1: 1eff37863447b63de5b28cca9eae5b2f6139e23d
Detailed log of new commits:
Author: abv
Date: Tue Oct 28 12:41:04 2014 +0300
0025418: Debug output to be limited to OCC development environment
Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation.
Macros starting with DEB are changed to start with "OCCT_DEBUG_".
Some code cleaned.
|
|
|
(0033780)
|
abv
|
2014-10-28 17:12
|
|
I have pushed revised change to branch CR25418_3, please review. In general it follows Roman's idea, the macro that enables extra debug message is called OCCT_DEBUG; on Windows it can be enabled by setting CSF_DEFINES=OCCT_DEBUG in custom.bat. Message_Messenger is kept as before, outputting to cout by default. |
|
|
(0033828)
|
jgv
|
2014-10-29 14:50
|
|
|
|
(0034023)
|
apv
|
2014-11-05 11:45
|
|
Dear BugMaster,
Branch CR25418_3 (and products from GIT master) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 1eff37863447b63de5b28cca9eae5b2f6139e23d
Number of compiler warnings:
occt component:
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component:
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Regressions/Differences:
Not detected
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 372161060 / 371748336
Total CPU difference: 48183.93000000015 / 48295.23000000005
Testing on Windows:
Total MEMORY difference: 275294604 / 273048988
Total CPU difference: 38016.71875 / 37049.625 |
|
|
(0034033)
|
git
|
2014-11-05 12:49
|
|
Branch CR25418_4 has been created by abv.
SHA-1: 3972b056337c98762d2e44d9d4ea3a0a5006b227
Detailed log of new commits:
Author: abv
Date: Tue Oct 28 12:41:04 2014 +0300
0025418: Debug output to be limited to OCC development environment
Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation.
Macros starting with DEB are changed to start with "OCCT_DEBUG_".
Some code cleaned.
|
|
|
(0034341)
|
git
|
2014-11-12 09:54
|
|
Branch CR25418 has been deleted by inv.
SHA-1: c2a717fddbb88b7680181126b955779272a35fe3 |
|
|
(0034342)
|
git
|
2014-11-12 09:54
|
|
Branch CR25418_2 has been deleted by inv.
SHA-1: dde1a635639e7b7908ee193a18d8ac4e568b4c0d |
|
|
(0034343)
|
git
|
2014-11-12 09:55
|
|
Branch CR25418_3 has been deleted by inv.
SHA-1: 1eff37863447b63de5b28cca9eae5b2f6139e23d |
|
|
(0034344)
|
git
|
2014-11-12 09:55
|
|
Branch CR25418_4 has been deleted by inv.
SHA-1: 3972b056337c98762d2e44d9d4ea3a0a5006b227 |
|