This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 209786 - Allow configuring the number of log files in the var/log directory
Summary: Allow configuring the number of log files in the var/log directory
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal with 2 votes (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2012-03-20 12:00 UTC by jirka_x1
Modified: 2016-06-28 16:33 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
proposed patch (2.10 KB, patch)
2012-03-29 14:08 UTC, andreagualano
Details | Diff
added documentation to arch.xml (3.14 KB, patch)
2012-03-30 08:26 UTC, andreagualano
Details | Diff
changed property name to org.netbeans.log.numberOfFiles (3.15 KB, patch)
2012-03-30 08:37 UTC, andreagualano
Details | Diff
added test cases (7.06 KB, patch)
2012-04-11 11:44 UTC, andreagualano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jirka_x1 2012-03-20 12:00:21 UTC
Currently, the number of log files in the var/log is hardcoded to three. So if a user experiences an error, and the app developer asks him for log files, the relevant file might be already gone. Allow configuring this.
Comment 1 Jaroslav Tulach 2012-03-26 23:28:15 UTC
If you want to provide patch, it would be in this file:
http://hg.netbeans.org/ergonomics/file/default/core.startup/src/org/netbeans/core/startup/TopLogging.java

However I don't believe it will help anything. The developer would first need to ask the user to reconfigure the default. Before the # of log files is reconfigured, the relevant file has the same probably to be gone as in this case.

As soon as the developer talks to the user (and the error re-appers), the option is no longer needed.

Marking won'tfix, but I am ready to accept the patch.
Comment 2 andreagualano 2012-03-29 07:59:06 UTC
I disagree.

While it may be useless to increase the number of log files after the fact, if there was a way to change that with a command line switch or a system property, a developer would change that in their app.conf according to their applications's need.

I've had this problem before, and I would certainly distribute my applications with a higher number of log files without waiting for a user reporting a problem.
Comment 3 andreagualano 2012-03-29 14:08:48 UTC
Created attachment 117475 [details]
proposed patch
Comment 4 Jaroslav Tulach 2012-03-29 19:04:10 UTC
Y01 The new property should be described in core.startup/arch.xml as exported systemproperty API.
Comment 5 andreagualano 2012-03-30 08:26:39 UTC
Created attachment 117527 [details]
added documentation to arch.xml

I used "friend" as category, I'm not sure if that's right.

Also, I used "TopLogging." as a prefix since other properties used in the class had that prefix. But now I see none of them was documented, so maybe "netbeans.logger." or "org.netbeans.log." would be more appropriate?
Comment 6 andreagualano 2012-03-30 08:37:17 UTC
Created attachment 117530 [details]
changed property name to org.netbeans.log.numberOfFiles

Same as the other patch, but system property name changed to "org.netbeans.log.numberOfFiles".
Comment 7 Jaroslav Tulach 2012-04-06 12:57:08 UTC
OK, to integrate I need one more thing:

Y02 Write a test to check proper behavior of the property
Comment 8 andreagualano 2012-04-11 11:44:26 UTC
Created attachment 118119 [details]
added test cases
Comment 9 Jaroslav Tulach 2012-04-12 10:13:37 UTC
Nice work. The last thing I need to accept it, is to find you on the list of approved contributors: http://wiki.netbeans.org/FaqHowDoIFileACA
Comment 10 Jaroslav Tulach 2012-04-18 14:50:44 UTC
Waiting. Reopen when you are approved.
Comment 11 andreagualano 2012-04-18 14:55:18 UTC
I sent the OCA Friday, I'm waiting for it to show on the approved list. Will reopen when it does.
Thanks.
Comment 12 andreagualano 2012-04-19 11:39:55 UTC
My OCA was accepted today.
http://www.oracle.com/technetwork/goto/oca
Comment 13 Jaroslav Tulach 2012-04-19 12:09:16 UTC
http://hg.netbeans.org/ergonomics/rev/5926cc89a61b
Comment 14 jirka_x1 2012-04-24 09:11:06 UTC
That's great! Thanks.
Comment 15 Quality Engineering 2012-04-26 10:36:17 UTC
Integrated into 'main-golden', will be available in build *201204260400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5926cc89a61b
User: andreagualano@netbeans.org
Log: #209786: Introducing org.netbeans.log.numberOfFiles property
Comment 16 sproger1 2016-06-28 16:33:52 UTC
Thank you for adding this enhancement.