Skip to content
Snippets Groups Projects

LogSetupInformation in CreateInstance is too invasive

Merged Guillaume Pasero requested to merge move_log_setup_info into develop
All threads resolved!

I think the LogSetupInformation was too invasive in Logger::CreateInstance(). For instance, just printing the help of an otbcli application, you get those 3 lines of logs just before the list of parameters (plus, they are useless here since no processing is done). I moved it to 2 locations:

  • in the TestMain, just before launching the test
  • in otb::Wrapper::Application, at the start of ExecuteAndWriteOutput() (and it allows also to use the application own logger directly instead of the singleton).

Feel free to suggest other relevant places.

Merge request reports

Merged by Guillaume PaseroGuillaume Pasero 7 years ago (Apr 11, 2018 8:39am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Guillaume Pasero
  • Julien Michel resolved all discussions

    resolved all discussions

  • This can be merged I think.

  • I will submit it to dashboard

  • Guillaume Pasero resolved all discussions

    resolved all discussions

  • Guillaume Pasero added 38 commits

    added 38 commits

    Compare with previous version

  • Guillaume Pasero resolved all discussions

    resolved all discussions

  • Guillaume Pasero added 40 commits

    added 40 commits

    Compare with previous version

  • mentioned in commit a3a5c936

  • With a recent version of develop (after merge of this MR), when running a composite application, I have :

    $ ~/dev/build/otb/bin/otbcli_LargeScaleConnectedComponent -in image.tif -expr "distance < 50" -out cc.sqlite -fusion 1 -minsize 50 
    2018-04-13 17:30:44 (INFO): Default RAM limit for OTB is 128 MB
    2018-04-13 17:30:44 (INFO): GDAL maximum cache size is 190 MB
    2018-04-13 17:30:44 (INFO): OTB will use at most 4 threads
    2018-04-13 17:30:44 (INFO): Default RAM limit for OTB is 128 MB
    2018-04-13 17:30:44 (INFO): GDAL maximum cache size is 190 MB
    2018-04-13 17:30:44 (INFO): OTB will use at most 4 threads
    2018-04-13 17:30:44 (INFO): Loading kwl metadata from attached geom file image.geom
    2018-04-13 17:31:00 (INFO): Elapsed: 15.923 seconds.
    2018-04-13 17:31:00 (INFO): Estimated memory for full processing: 286.064MB (avail.: 128 MB), optimal image partitioning: 3 blocks
    2018-04-13 17:31:00 (INFO): File cc.sqlite_labelmap.tif will be written in 4 blocks of 5000x1251 pixels
    Writing cc.sqlite_labelmap.tif...: 24% [************                                      ]2018-04-13 17:31:00 (WARNING): Skipping GCPs saving to prevent GDAL from assigning a WGS84 projref to file (cc.sqlite_labelmap.tif)
    Writing cc.sqlite_labelmap.tif...: 100% [**************************************************] (1 seconds)
    2018-04-13 17:31:02 (INFO): Default RAM limit for OTB is 128 MB
    2018-04-13 17:31:02 (INFO): GDAL maximum cache size is 190 MB
    2018-04-13 17:31:02 (INFO): OTB will use at most 4 threads
    2018-04-13 17:31:02 (INFO): Loading kwl metadata from attached geom file cc.sqlite_labelmap.geom
    2018-04-13 17:31:02 (INFO): Estimated memory for full processing: 286.064MB (avail.: 128 MB), optimal image partitioning: 3 blocks
    2018-04-13 17:31:02 (INFO): Estimation will be performed in 4 blocks of 5000x1251 pixels
    Retrieve region count...: 100% [**************************************************] (0 seconds)
    2018-04-13 17:31:03 (INFO): Number of tiles: 10 x 10
    2018-04-13 17:31:03 (INFO): Sums calculation ...
    2018-04-13 17:31:04 (INFO): Building LUT for small regions merging ...

    The log messages appear several times ...

  • mentioned in issue #1561 (closed)

  • Please register or sign in to reply
    Loading