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 Managment #135
Comments
started working on a wiki page for Log4j |
@RonGatenio, can this issue be closed? |
not yet... I need read about slf4j first |
@inbalzukerman |
Yay! Thank you 👍 |
I changed the logger to slf4j (I'll explain why later). For now, this is the new syntax: import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
public class MyClass {
private static Logger log = LoggerFactory.getLogger(MyClass.class);
} Note that log4j is still accessible (slf4j uses log4j... again, I'll explain this later...). So avoid using it! Also, there is no longer a The old syntax (for a remainder): import org.apache.log4j.Logger;
public class MyClass {
private static Logger log = Logger.getLogger(MyClass.class);
} |
Something nice about the logger... public void myFunc() {
try {
//...
} catch (Exception e) {
log.error("Big error, very bad!", e);
}
} This will log the string and the stack trace:
|
Another thing, try to avoid |
Research upon a logging system for our project.
As discussed in our meeting, try to research first the classes
Fault
andMonitor
from the Spartanizer project.The text was updated successfully, but these errors were encountered: