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

Logging #9

Open
hendryluk opened this issue Feb 9, 2015 · 0 comments
Open

Logging #9

hendryluk opened this issue Feb 9, 2015 · 0 comments

Comments

@hendryluk
Copy link
Owner

From Jboss Weld.
A simple support for logging:

public class MyClass
{
   [Inject, Logger] ILogger _logger;
}

Which is equivalent to the traditional way:

public class MyClass
{
    private static ILogger _logger = LogFactory.GetLogger(typeof(MyClass));
}

This should be part of the Cormo core (instead of a separate module). However I'm thinking of using CommonLogger (instead of a specific logging framework, due to fragmentation of .net loggers), with the downside being it requires developers to add an extra nuget (for their logging-framework of choice) to get logging happen, instead of just happen by default without the need to add any other dependency. But at least by default it should write logs to .net's Debug and Trace.
This also includes writing log entries from within all over Cormo codebase.

Jboss Weld also comes with more advanced ways of logging, such as typed logging, message-bundles, and internationalization. I'm not sure how much value it will add to us, so I'm deferring that implementation and just stick with a simpler logger injection for now
Ref: https://docs.jboss.org/weld/extensions/reference/latest/en-US/html_single/#logging

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

No branches or pull requests

1 participant