Issue 123595 - Cleanup logging of make_installer.pl and its modules
Summary: Cleanup logging of make_installer.pl and its modules
Status: CONFIRMED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: 4.1.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.1.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-31 10:31 UTC by Andre
Modified: 2017-05-20 10:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Fix build breaker triggered in packagepool.pm (1.55 KB, patch)
2013-12-02 08:08 UTC, Andre
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Andre 2013-10-31 10:31:58 UTC
The make_installer.pl in solenv/bin and its modules in solenv/bin/modules/installer(/windows) use very heterogeneous methods to write log information to console or log files.  These methods include
- simple print() calls
- adding lines to global arrays @logfileinfo and @globallogfileinfo
- calling functions in installer::logger 

There are three different log channels: the console, language dependent log information, language independent log information.  Output to the console is not included in any log file.

The goal of this issue is to make logging a little bit more understandable and logical.
Comment 1 Andre 2013-10-31 10:33:17 UTC
This is part of preliminary work for adding support for the creation of Windows patches.  See bug 123531 for more details.
Comment 2 SVN Robot 2013-10-31 10:37:57 UTC
"af" committed SVN revision 1537433 into trunk:
123595: Cleanup logging in make_installer.pl and its modules.
Comment 3 Andre 2013-10-31 10:43:47 UTC
installer::logger is now partly a class.  Its three default objects are

installer::logger::Info
installer::logger::Lang
installer::logger::Global

Info is for writing messages to the console.  They are copied to Lang. 
Lang is for more detailed messages that are language dependent.  They are only written to a log file.
Global is for more detailed messages that are language independent.  They are copied to the start of every language dependent log file (this is the original behavior).

Log messages are written to the console as is.  Messages are written to log files with additional information: the relative time since logging started and the original channel (abbreviated to info, lang, and glob).

Log messages are written to the channels via print and printf methods.

More information is available in installer/logger.pm.
Comment 4 Andre 2013-11-01 09:57:59 UTC
Fixed a build breaker: missed a call to print_message() which now dies with a deprecation message.

Added some diagnostics to printf (output of stack trace) when the message contains a % after sprintf formatting.  Apparently there are some printf calls that use a broken format string.
A % in the formatted message is a valid case, therefore this change is intended to be temporary.
Comment 5 SVN Robot 2013-11-01 10:10:32 UTC
"af" committed SVN revision 1537878 into trunk:
123595: logger::printf now writes stack trace when formatted message still co...
Comment 6 SVN Robot 2013-11-01 10:13:47 UTC
"af" committed SVN revision 1537879 into trunk:
123595: Use print instead of printf when text is to be printed verbatim.
Comment 7 SVN Robot 2013-11-04 08:46:43 UTC
"af" committed SVN revision 1538529 into trunk:
123595: Add temporary debug code to find who prints '%{'.
Comment 8 SVN Robot 2013-11-07 12:58:50 UTC
"af" committed SVN revision 1539620 into trunk:
123595: Added missing .idl extension to exclude from error messages.
Comment 9 SVN Robot 2013-11-07 14:41:29 UTC
"af" committed SVN revision 1539661 into trunk:
123595: RPM output lines need no printf
Comment 10 SVN Robot 2013-11-29 14:37:01 UTC
"af" committed SVN revision 1546570 into trunk:
123595: Logging of make_installer.pl now supports indentation.
Comment 11 Andre 2013-12-02 08:08:13 UTC
Created attachment 82021 [details]
Fix build breaker triggered in packagepool.pm

There is a build breaker that is triggered in some cases when a Linux build is made.  It is caused by a log message printed in solenv/bin/modules/installer/packagepool.pm.
Comment 12 SVN Robot 2013-12-02 14:14:38 UTC
"af" committed SVN revision 1547024 into trunk:
123595: Don't print newline as first character in line.
Comment 13 Oliver-Rainer Wittmann 2014-02-10 10:27:31 UTC
@Andre: Is this issue solved?
Comment 14 Marcus 2017-05-20 10:44:54 UTC
Reset the assignee to the default "issues@openoffice.apache.org".