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

Disable console output #84

Open
tzipperle opened this issue Aug 30, 2018 · 15 comments
Open

Disable console output #84

tzipperle opened this issue Aug 30, 2018 · 15 comments

Comments

@tzipperle
Copy link

Hi,
is there a easy opition to disable all output from the console?

for e.g.
... DEBUG at.ac.iiasa.ixmp.database.DbDAO:1695 ...
--- Job MESSAGE_run.gms ...

@danielhuppmann
Copy link
Member

The Java-logging will be less verbose in the next release, scheduled before the end of the summer. For the GAMS-output, that will be more tricky...

@gidden
Copy link
Member

gidden commented Aug 31, 2018 via email

@tzipperle
Copy link
Author

The Java-logging will be less verbose in the next release, scheduled before the end of the summer. For the GAMS-output, that will be more tricky...

Is there a planned release date yet?

@gidden
Copy link
Member

gidden commented Sep 21, 2018 via email

@tzipperle
Copy link
Author

Thanks @gidden for the information.

What is the best way to test the new renewable implementation until the release?

conda uninstall --force message_ix

pip install git+https://github.com/iiasa/message_ix.git@hackathon-prs

Do I have to change also something at the ixmp installation?

@gidden
Copy link
Member

gidden commented Sep 21, 2018

You will need the latest ixmp master branch, but I think that is all. @danielhuppmann the ixmp master branch is aligned with hackathon-prs right?

@gidden
Copy link
Member

gidden commented Sep 21, 2018

Ah, also if you want to test out disabling console output, you will need #88

@gidden
Copy link
Member

gidden commented Sep 21, 2018

which you can do with ixmp.Platform.set_log_level('NOTSET')

@tzipperle
Copy link
Author

Thanks, I will try it...

@tzipperle
Copy link
Author

tzipperle commented Sep 21, 2018

Installation workflow:

conda uninstall --force ixmp
conda uninstall --force message-ix

install ixmp

git clone https://github.com/danielhuppmann/ixmp.git
git checkout newjar
python setup.py install

install message_ix

git clone https://github.com/iiasa/message_ix.git
git checkout hackathon-prs
python setup.py install && pytest tests

Error:

--- MESSAGE_run.gms(199) 4 Mb
***
*** Abort "The MESSAGEix version and the MESSAGE-scheme definition in the installed ixmp package do not match!"
***

I also had to remove my local database due to migration issues.

@danielhuppmann
Copy link
Member

yes, #88 brings in a extended MESSAGE-scheme (v1.1) - you'll need the branch from iiasa/message_ix#113 to be in sync between MESSAGEix and ixmp.

Can you send me a screenshot of the flyway migration issues with your local database?

@gidden
Copy link
Member

gidden commented Sep 21, 2018

@danielhuppmann I guess we will see this when we rerun CI?

@tzipperle
Copy link
Author

yes, #88 brings in a extended MESSAGE-scheme (v1.1) - you'll need the branch from iiasa/message_ix#113 to be in sync between MESSAGEix and ixmp.

Can you send me a screenshot of the flyway migration issues with your local database?

with this config MESSAGEix an ixmp now works for me, but the migration issue is also there:

jpype._jexception.FlywayExceptionPyRaisable: org.flywaydb.core.api.FlywayException: Validate failed: Migration checksum mismatch for migration 1
-> Applied to database : 1588531206
-> Resolved locally : 822227094

@danielhuppmann
Copy link
Member

The problem with the checksum mismatch is due to different line endings (LF vs. CRLF) - before, that was local-system-dependent, but it will be consistent going forward. Otherwise, it would not be possible to hand over hsqldb files between Windows and Linux.

Two options for now: if you have nothing important in your local db, delete and start fresh. Otherwise, open the HSQLDB with your favourite sql dev tool and update the schema_version table manually.

@tzipperle
Copy link
Author

tzipperle commented Sep 25, 2018

I have tried the logger option. However, the name NOTSET is maybe a little bit confusing. In python NOTSET allows all levels.

import logging

logging.basicConfig(level=logging.NOTSET)
log = logging.getLogger()

log.debug('debug')
log.info('info')
log.warning('warning')
log.error('error')
log.critical('critical')

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

3 participants