engine_web-ifc icon indicating copy to clipboard operation
engine_web-ifc copied to clipboard

Optionalize logging of console version, and add to API

Open pablo-mayrgundter opened this issue 2 years ago • 17 comments

For https://github.com/bldrs-ai/ifctool we're invoking web-ifc in a command line tool. In this setting the web-ifc version log corrupts the process output.

I realize it's useful for web console to help people submit bug reports. Maybe it can be optionalized with a flag:

new WebIFC.IfcAPI({debugLogging: false}) // don't log version

We still do need the version info though, and would like to access it via an API method, e.g.:

getVersion: string

I'm having trouble building web-ifc currently or would submit myself. Will try to get this working later tho.

pablo-mayrgundter avatar Jun 25 '22 11:06 pablo-mayrgundter

Here's a workaround in my main.js that I call from node:

#!/usr/bin/env node


// HACK(pablo): Setup a filtering logger that filters output to remove
// web-ifc version string.
const origLogger = console.log
function filterLogger() {
  if (arguments[0].startsWith('web-ifc: ')) {
    return
  }
  origLogger(...arguments)
}
console.log = filterLogger


import WebIFC from 'web-ifc'
...

pablo-mayrgundter avatar Jun 29 '22 20:06 pablo-mayrgundter

::take

aka-blackboots avatar Oct 10 '22 16:10 aka-blackboots

🟢🟢🟢

::take

Hi, @aka-blackboots! Thanks for taking this bounty! The due date is October 31, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas avatar Oct 10 '22 16:10 agviegas

::drop

aka-blackboots avatar Oct 10 '22 16:10 aka-blackboots

🟢🟢🟢

::drop

Hi, @aka-blackboots! Thanks for giving it a try! It’s now once again available for anyone to take.

agviegas avatar Oct 10 '22 16:10 agviegas

::take

TxTony avatar Oct 15 '22 12:10 TxTony

🟢🟢🟢

::take

Hi, @TxTony! Thanks for taking this bounty! The due date is November 5, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas avatar Oct 15 '22 13:10 agviegas

Hi Tony,

I had started on this but didn't grab the bounty. I have it mostly done. I could take or if you'd like here for reference:

https://github.com/IFCjs/web-ifc/pull/235

Note, one issue left about plumbing the log level through correctly from TS.

Cheers, Pablo

On Sat, Oct 15, 2022 at 8:00 AM Antonio González Viegas < @.***> wrote:

🟢🟢🟢

::take

Hi, @TxTony https://github.com/TxTony! Thanks for taking this bounty! The due date is November 5, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas https://github.com/agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

— Reply to this email directly, view it on GitHub https://github.com/IFCjs/web-ifc/issues/188#issuecomment-1279741030, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS5V35G24USJY6I4WRC2NTWDKTF5ANCNFSM5Z2EPDLQ . You are receiving this because you authored the thread.Message ID: @.***>

-- interweb homepage http://sites.google.com/site/pablomayrgundter

pablo-mayrgundter avatar Oct 15 '22 15:10 pablo-mayrgundter

Hey @pablo-mayrgundter thanks for your help! I guess that if you have it done, it wouldn't make sense for @TxTony to invest time here. In the future, to avoid conflicts, please take the bounty

agviegas avatar Oct 17 '22 10:10 agviegas

no it's okay @agviegas in private I already give the possibility to take the bounty or you can reassign I accept

TxTony avatar Oct 17 '22 12:10 TxTony

::drop

TxTony avatar Oct 17 '22 12:10 TxTony

🟢🟢🟢

::drop

Hi, @TxTony! Thanks for giving it a try! It’s now once again available for anyone to take.

agviegas avatar Oct 17 '22 12:10 agviegas

@pablo-mayrgundter take it

TxTony avatar Oct 17 '22 12:10 TxTony

::take

Thanks guys!

pablo-mayrgundter avatar Oct 17 '22 15:10 pablo-mayrgundter

@TxTony thanks a ton! ♥ @pablo-mayrgundter the comments has to have just the command, without any additional text!

agviegas avatar Oct 17 '22 15:10 agviegas

::take

pablo-mayrgundter avatar Oct 17 '22 15:10 pablo-mayrgundter

🟢🟢🟢

::take

Hi, @pablo-mayrgundter! Thanks for taking this bounty! The due date is November 7, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas avatar Oct 17 '22 15:10 agviegas

🔴🔴🔴

Hi, @pablo-mayrgundter! The date is past due, your assignment has been revoked. It’s now available for anyone to take.

agviegas avatar Nov 08 '22 00:11 agviegas

Oh hey, I think this was finished in https://github.com/IFCjs/web-ifc/pull/261. Please close!

On Tue, Nov 8, 2022 at 1:00 AM Antonio González Viegas < @.***> wrote:

🔴🔴🔴

Hi, @pablo-mayrgundter https://github.com/pablo-mayrgundter! The date is past due, your assignment has been revoked. It’s now available for anyone to take.

— Reply to this email directly, view it on GitHub https://github.com/IFCjs/web-ifc/issues/188#issuecomment-1306390547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS5V32TM5ATB5WHQ7S2L2LWHGJZFANCNFSM5Z2EPDLQ . You are receiving this because you were mentioned.Message ID: @.***>

-- interweb homepage http://sites.google.com/site/pablomayrgundter

pablo-mayrgundter avatar Nov 08 '22 10:11 pablo-mayrgundter

::done

On Mon, Oct 17, 2022 at 12:25 PM Antonio González Viegas < @.***> wrote:

Hey @pablo-mayrgundter https://github.com/pablo-mayrgundter thanks for your help! I guess that if you have it done, it wouldn't make sense for @TxTony https://github.com/TxTony to invest time here. In the future, to avoid conflicts, please take the bounty

— Reply to this email directly, view it on GitHub https://github.com/IFCjs/web-ifc/issues/188#issuecomment-1280635501, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS5V36B563DWGY66PKWWBTWDUSQXANCNFSM5Z2EPDLQ . You are receiving this because you were mentioned.Message ID: @.***>

-- interweb homepage http://sites.google.com/site/pablomayrgundter

pablo-mayrgundter avatar Nov 08 '22 10:11 pablo-mayrgundter