GithubHelp home page GithubHelp logo

Comments (6)

atusy avatar atusy commented on June 8, 2024

Hi. This sounds like knitr's issue.

Anyway, it sounds good to me to logging on the console or somewhere.
In this way, users can stop knitting once they find some unexpected messages or warnings.

On the other hand, I would keep the current behavior of the chunk options (message, warning and error) for the simplicity.
An alternative approach would be to provide package options for logging, e.g., knitr::opts_knit(loglevel = "warning", logfile = "stderr").

According to the docs

Would you provide a link to the doc that describes your expected behavior?
I briefly read through https://yihui.org/knitr/options/ , but cannot find it.

from rmarkdown.

bbimber avatar bbimber commented on June 8, 2024

Thanks for the fast reply. It is possible knitr and not rmarkdown. Should anyone else run into a need to log to the console, I just found the logger package:

logger::log_info('I will print to the console!')

Which is a much more direct way to address this.

from rmarkdown.

yihui avatar yihui commented on June 8, 2024

FALSE will completely suppress the messages. If you want messages to be printed to the console, you can use NA. More info here: https://yihui.org/en/2022/12/message-false/ (I need to update the doc at https://yihui.org/knitr/options/).

from rmarkdown.

bbimber avatar bbimber commented on June 8, 2024

@yihui Thank you, your first post fits. I was sure the behavior used to be that message=FALSE would print them, but I could not find the docs on it. message=NA does behave as you posted. Nonetheless, I think explicitly logging is probably a more clear route and I think we'll use this.

It would be great if you could update the docs since it took a while to figure out the expected behavior.

from rmarkdown.

yihui avatar yihui commented on June 8, 2024

I'll update the docs for sure. Sorry about the confusion!

from rmarkdown.

yihui avatar yihui commented on June 8, 2024

Docs have been updated. Thanks!

from rmarkdown.

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.