-
Notifications
You must be signed in to change notification settings - Fork 41
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
[DOXIA-534] Migrate logging to slf4j and deprecate doxia-logging-api #8
Conversation
Deprecate doxia-logging-api based on plexus and implement logging based on slf4j. more log updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm taking a look at this project. Is this PR still in process?
|
||
protected Logger logger = LoggerFactory.getLogger( getClass() ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final?
@@ -151,6 +153,7 @@ public void executeMacro( String macroId, MacroRequest request, Sink sink ) | |||
* @return The base directory. | |||
* @deprecated this does not work in multi-module builds, see DOXIA-373 | |||
*/ | |||
@Deprecated | |||
protected File getBasedir() | |||
{ | |||
// TODO: This is baaad, it should come in with the request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete now irrelevant todo
@@ -58,18 +60,24 @@ | |||
/** lazy xmlReader to validate xml content*/ | |||
private XMLReader xmlReader; | |||
|
|||
private Log logger; | |||
private static final Logger LOGGER = LoggerFactory.getLogger( XmlValidator.class ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger since it's not really a constant value
@@ -161,13 +164,12 @@ private Log getLog() | |||
private static final Pattern ELEMENT_TYPE_PATTERN = | |||
Pattern.compile( "Element type \".*\" must be declared.", Pattern.DOTALL ); | |||
|
|||
private final Log log; | |||
private final Logger log = LoggerFactory.getLogger( MessagesErrorHandler.class ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static?
logger?
protected static String normalizeLineEnds(String s) { | ||
if ( s != null) { | ||
return s.replace("\r\n", "\n" ); | ||
// .replace('\r', '\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no commented code please
* Wrap a Slf4j logger into a Doxia logger. | ||
* | ||
* @since 1.7 | ||
* @deprecated use directly slf4j |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slf4j directly
|
||
public void debug( CharSequence content ) | ||
{ | ||
if ( logger.isDebugEnabled() ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use braces in multiline ifs
New version that deprecates doxia-logging