New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for logback's maxFileSize attribute #1000

Merged
merged 4 commits into from Apr 23, 2015

Conversation

Projects
None yet
7 participants
@ckingsbu

ckingsbu commented Apr 19, 2015

This is a pull request to add support for logback's maxFileSize attribute. Earlier discussed here: #997

@@ -95,6 +106,8 @@
@Min(1)
private int archivedFileCount = 5;
private String maxFileSize;

This comment has been minimized.

@jplock

jplock Apr 19, 2015

Member

Could we use Dropwizard's Size class here instead of a string? Then we can enforce validation.

This comment has been minimized.

@ckingsbu

ckingsbu Apr 19, 2015

Sure, looks easy enough, let me give it a try now.

@johnwiesel

This comment has been minimized.

johnwiesel commented Apr 20, 2015

Very much looking forward to this merge.

@horzelam

This comment has been minimized.

horzelam commented Apr 20, 2015

I'm waiting for this support too : - )

@ckingsbu

This comment has been minimized.

ckingsbu commented Apr 22, 2015

OK, I've switched it over to the io.dropwizard.util.Size class for validation. I'm not happy with my docs for the syntax. Anybody know of some existing example syntax I can point to? HttpConnectorFactory can make use of this as well.

* <td>(unlimited)</td>
* <td>
* The maximum size of the currently active file before a rollover is triggered. The value can be expressed
* in bytes, kilobytes, megabytes, gigabytes, and terabytesyp by appending B, K, MB, GB, or TB to the

This comment has been minimized.

@jplock

jplock Apr 22, 2015

Member

Minor spelling mistake on terabytes

@ckingsbu

This comment has been minimized.

ckingsbu commented Apr 22, 2015

Thanks, fixed the typo

@carlo-rtr carlo-rtr removed the needs code label Apr 23, 2015

@carlo-rtr

This comment has been minimized.

Member

carlo-rtr commented Apr 23, 2015

Thanks for the contribution

carlo-rtr added a commit that referenced this pull request Apr 23, 2015

Merge pull request #1000 from ckingsbu/maxFileSize-support
add support for logback's maxFileSize attribute

@carlo-rtr carlo-rtr merged commit d0a320a into dropwizard:master Apr 23, 2015

@jplock jplock added this to the 0.9.0 milestone Apr 23, 2015

@arteam arteam added the feature label Apr 26, 2015

@ckingsbu ckingsbu deleted the ckingsbu:maxFileSize-support branch Jun 11, 2015

@akshaymaniyar

This comment has been minimized.

akshaymaniyar commented Sep 28, 2015

Hey just wanted to know one thing, how will archivedFileCount work here. Will it ensure that a maximin of 7 files are only maintained? Or will it maintain the files for the last 7 days?

@ckingsbu

This comment has been minimized.

ckingsbu commented Oct 14, 2015

Hi Akshay, the change I made was specifially for the max file size of a
single log. The archivedFileCount:

http://www.dropwizard.io/0.7.0/dropwizard-logging/apidocs/io/dropwizard/logging/FileAppenderFactory.html

looks to control the number of logfiles that are rolled(archived). It the
number of files, not days.

On Tue, Sep 29, 2015 at 4:36 AM, Akshay Maniyar notifications@github.com
wrote:

Hey just wanted to know one thing, how will archivedFileCount work here.
Will it ensure that a maximin of 7 files are only maintained? Or will it
maintain the files for the last 7 days?


Reply to this email directly or view it on GitHub
#1000 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment