[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] Logging

Good question. We now commonly use SLF4j

private static final Logger LOG = LoggerFactory.getLogger(SomeClass.class);

from org.slf4j package.

We then use LOG.debug(…) and friends to log the output. With me2 installed, the log output starting with INFO log level automatically get's appended to the Eclipse log. Debug messages should go to the console. It's not an optimal approach for logging/debugging  in Eclipse, but it works reasonable well in most cases.

RcpPlugin.logError is used only in rare cases when we need to log one or two messages in a class. 


Am 16.10.2013 um 16:06 schrieb Timur Achmetow <achmetow84@xxxxxxxxxxxxxx>:

> Hallo,
> what's the most common way for logging in o.e.r.?
> Here's a small code snippet from o.e.r.
> RcpPlugin.logError(ex, "Failed to instantiate executable %s:%s", //$NON-NLS-1$
>                         element.getName(), element.getAttribute("class")); //$NON-NLS-1$
> Other favorites? I need something like that: Logger.debug("bla bla");
> Regards,
> Tim
> _______________________________________________
> recommenders-dev mailing list
> recommenders-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/recommenders-dev