Comments (5)
Sorry, I believe that the output in your screenshot is determined in the compiled ixmp.jar
, and this is distinct from the _LOGGER.setLevel()
. Not sure why this was changed in the first place before the latest release.
We will rework the Java logging in the next release.
from ixmp.
Make sense, because I could not get access via the python logging root handler...
from ixmp.
@zikolach and @fonfon would it be possible to access and set the log level in java from python as well?
from ixmp.
@gidden you can do it by programmatically by calling e.g.:
org.apache.log4j.Logger.getLogger(Platform.class.getPackage().getName()).setLevel(org.apache.log4j.Level.DEBUG)
Alternatively I can add a (static) method to Platform class for setting it. But we have bundled log4j.properties file with some predefined settings:
log4j.appender.FA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FA.file=D:/tmp/GasmAgeServlet-app.log
log4j.rootLogger=FA, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %5p %c:%L - %m%n
log4j.logger.at.ac.iiasa.kolp.cleanage.servlet.DatabaseHelper=info
log4j.logger.at.ac.iiasa.ixmp.servlet.AuthDbFilter=info
log4j.logger.at.ac.iiasa.ixmp.servlet.RestServlet=debug
which I would replace with
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %5p %c:%L - %m%n
log4j.logger.org.flywaydb.core.internal=warn
as default
from ixmp.
Hi @tzipperle βgoing to close this now since the code is substantially changed and I don't suspect this can occur anymore. Now, the top-level ("ixmp") logger is configured here:
Lines 44 to 48 in 59e99e4
The Java backend, at the point when any new Platform is instantiated, uses either a user argument or copies this value:
Lines 212 to 216 in 59e99e4
After this, the mp.set_log_level()
method can be used to control the log messages emitted from Java. At any time or point, the "ixmp" logger can be manipulated in the usual Python way.
If any similar issue is still happening with the newest code, please open a new issue.
from ixmp.
Related Issues (20)
- Scenario.timeseries() doesn't filter results with 'year' field HOT 1
- Cannot commit after add_timeseries() call HOT 9
- Adjust for mypy 0.960
- How to remove a variable from a scenario? HOT 1
- Scenario.timeseries() not working when using transact() or check_out() HOT 2
- Database schema does not match ixmp schema HOT 4
- GAMS executable not found in PATH HOT 1
- Adjust for pandas 1.5.0 HOT 1
- Editable install not working HOT 15
- Update actions used in CI workflows
- Work around conda-forge/openjdk-feedstock#107
- Adjust for JPype1 v1.4.1 HOT 7
- Adjust for mypy `--no-implicit-optional`
- Address failing tests of R/Jupyter notebooks
- Adjust for pandas 2.0.0 HOT 4
- IXMP on Apple Silicon (ARM architecture) HOT 11
- Documentation to subannual timeslices erroneous
- `ixmp[tests] <= 3.6.0` not installable β `codecov` yanked from PyPI HOT 1
- R 4.3.0 not working as expected on macOS HOT 2
- Track/work around actions/setup-python#682 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ixmp.