Skip to content
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

Does DefaultLogConfiguration use the specified formatters? #31

Closed
vittoriom opened this issue Dec 2, 2015 · 5 comments
Closed

Does DefaultLogConfiguration use the specified formatters? #31

vittoriom opened this issue Dec 2, 2015 · 5 comments

Comments

@vittoriom
Copy link

I'm quite confused about this, but could it be that the log formatters passed as a parameter to the DefaultLogConfiguration initializer are just ignored?

Looking at the code, I can't see any property in the log configuration class where they are stored.

This is at the very minimum confusing, other than a possible bug :)

@emaloney
Copy link
Owner

emaloney commented Jan 9, 2016

Hi, thanks for opening this ticket.

There are two initializers: one on line 60 and one on line 91.

The initializer on line 60 accepts a formatters: parameter and passes it along to the ASLLogRecorder, which is correct. So, if you pass that parameter to the first initializer, everything works as expected.

However, the initializer on line 91 also accepts that parameter, but as you correctly noted, doesn't do anything with it. I suspect I neglected to remove this as part of a past refactoring, and I'm surprised that the compiler doesn't generate a warning on an initializer parameter that has no effect.

Either way, I appreciate you noticing that and pointing it out.

@Laban1
Copy link

Laban1 commented Jan 11, 2016

Any ETA for a fix on this?

@emaloney
Copy link
Owner

This will be fixed once I merge in the code on the refactoring branch, which is slated to become the 2.0 release.

The new code is intended to make it easier to configure CleanroomLogger for using multiple log destinations. Also, it is now simpler to create customized formatters. I'm seeking feedback on the API changes, so please let me know if it works for your use-case.

Please see this comment for sample code showing how to configure logging for multiple destinations and this comment to see how to customize the format of log output.

@Laban1
Copy link

Laban1 commented Jan 11, 2016

I believe your changes should work for our use-case. I really like your logger and from the little I have used it so far, the only thing I am missing is time stamps (which is what I tried to use the DefaultLogFormatter for). It is such a basic feature that I would rather not create a custom formatter for it...

When do you estimate that the 2.0 release will be out?

@emaloney
Copy link
Owner

Hi all,

CleanroomLogger 2.0 has been released; as a result, I will be closing this ticket.

E.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants