ixmp icon indicating copy to clipboard operation
ixmp copied to clipboard

Disable console output

Open tzipperle opened this issue 6 years ago • 15 comments

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 ...

tzipperle avatar Aug 30 '18 14:08 tzipperle

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...

danielhuppmann avatar Aug 31 '18 05:08 danielhuppmann

There is probably something doable via the GAMS CLI. If so, we could check the log level and do something intelligent accordingly..

On Fri, Aug 31, 2018, 7:50 AM Daniel Huppmann [email protected] wrote:

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...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iiasa/ixmp/issues/84#issuecomment-417559012, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVAEUQEpcgFsi6C5bxJw30rENV96-sIks5uWM6LgaJpZM4WTiWz .

gidden avatar Aug 31 '18 11:08 gidden

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?

tzipperle avatar Sep 21 '18 07:09 tzipperle

Hi Thomas - we're shooting for the end of the month.

On Fri, Sep 21, 2018 at 9:50 AM Thomas Zipperle [email protected] wrote:

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?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/iiasa/ixmp/issues/84#issuecomment-423446382, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVAEczwvkFnGWOGdJQO0vNL1TfoF4xuks5udJpcgaJpZM4WTiWz .

gidden avatar Sep 21 '18 07:09 gidden

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?

tzipperle avatar Sep 21 '18 08:09 tzipperle

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 avatar Sep 21 '18 08:09 gidden

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

gidden avatar Sep 21 '18 08:09 gidden

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

gidden avatar Sep 21 '18 08:09 gidden

Thanks, I will try it...

tzipperle avatar Sep 21 '18 08:09 tzipperle

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.

tzipperle avatar Sep 21 '18 08:09 tzipperle

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

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

danielhuppmann avatar Sep 21 '18 10:09 danielhuppmann

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

gidden avatar Sep 21 '18 10:09 gidden

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

tzipperle avatar Sep 21 '18 10:09 tzipperle

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.

danielhuppmann avatar Sep 21 '18 10:09 danielhuppmann

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')

tzipperle avatar Sep 25 '18 11:09 tzipperle