Coder Social home page Coder Social logo

Comments (6)

kirsch33 avatar kirsch33 commented on August 12, 2024 2

This is actually causing me some issues now so I've chosen your first option above and created a PR, open to feedback:

#2309

from pyrevit.

kirsch33 avatar kirsch33 commented on August 12, 2024 1

hey @sanzoghenzo

i am fine with either option and dont mind to submit a PR to address but would like some direction from another maintainer before doing so.

from pyrevit.

sanzoghenzo avatar sanzoghenzo commented on August 12, 2024

Hi @kirsch33, thanks for pointing this out.
I've checked the history of that module and it seems it was always like that, maybe @eirannejad could shed some light on that.

But I agree with you, the name log_errors suggests that all the errors should/shouldn't be written.

We have some options here:

  • if this is a bug, add the self._logerror check before the lines you pointed
  • if this was an intended feature, add a log_commit_errors argument to the init and use that to suppress the logging, so that we keep retro-compatibility.

from pyrevit.

kirsch33 avatar kirsch33 commented on August 12, 2024

in the meantime, im trying to figure a workaround by completely suppressing all errors on a script level. i tried the following within a script that calls a pyRevit transaction:

logger = script.get_logger()
logger.set_quiet_mode()

but it doesnt seem to be working. any ideas @sanzoghenzo ?

from pyrevit.

sanzoghenzo avatar sanzoghenzo commented on August 12, 2024

in the meantime, im trying to figure a workaround by completely suppressing all errors on a script level. i tried the following within a script that calls a pyRevit transaction:

logger = script.get_logger()
logger.set_quiet_mode()

but it doesnt seem to be working. any ideas @sanzoghenzo ?

What does print(logger.get_level()) outputs? It should show something like CRITICAL, a log level that is never used in the codebase

from pyrevit.

kirsch33 avatar kirsch33 commented on August 12, 2024

it outputs 50 which corresponds to CRITICAL and in the script if I try logger.error("test") it does not activate the logging window which is what I want.

but if something in the transaction wrapper errors, it will still display the error level message. maybe the transaction wrapper is using a different logger ?

from pyrevit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.