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

dflib-jupyter: integrate Logback, allow to change log levels in notebook #61

Open
andrus opened this issue Jun 12, 2019 · 2 comments
Open

Comments

@andrus
Copy link
Collaborator

andrus commented Jun 12, 2019

We need an easy way to change log levels when working in Jupyter:

  • Set the default level to WARN to avoid logging things like SQL statements to the console.
  • Add API to DFLibJupyter to change this to more verbose logging.

To achieve this we'll likely need to swap slf4j-simple to logback as the logging provider. It allows changing levels in runtime:

 LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
Logger logger = loggerContext.getLogger(packageName);
logger.setLevel(level);

While this introduces a new dependency, it removes an equally bad dependency on slf4j-simple , so it won't make things worse on balance.

andrus added a commit that referenced this issue Jun 12, 2019
andrus added a commit that referenced this issue Jun 12, 2019
@andrus andrus added this to the 0.6 milestone Jun 12, 2019
@andrus andrus closed this as completed Jun 12, 2019
@andrus
Copy link
Collaborator Author

andrus commented Jun 13, 2019

Reopening due to the iJava classpath issue described here: SpencerPark/IJava#63 (comment) ... Once the issue is addressed, we can patch it back per attached diff:

61-diff.txt

@andrus andrus reopened this Jun 13, 2019
@andrus andrus removed this from the 0.6 milestone Jun 13, 2019
@andrus
Copy link
Collaborator Author

andrus commented May 15, 2024

This should already work with JJava kernel. However, let's decide, maybe this should be a part of JJava , not dflib-jupyter.

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

1 participant