Comments (2)
Aha! I guess stdout
is directed to /dev/null
?
See the "printf tracing" section available here: https://shiny.rstudio.com/articles/debugging.html
Also see this StackOverflow question: https://stackoverflow.com/questions/33912150/how-can-i-get-standard-output-written-to-a-log-file-when-a-shiny-app-is-deployed.
Since I was using the logging
[GitHub] package, I added a handler to the root logger.
# logging level DEBUG
logging::basicConfig(level = 10)
# write logging output to the stderr file
logging::addHandler(writeToFile, logger = '', file = stderr())
However, I switched to logger
[GitHub], as it appears to be more feature-rich and more-frequently maintained. The idea is the same:
# set the logger level
logger::log_threshold(INFO)
# direct the logger to write to stderr, since shiny only logs stderr
logger::log_appender(logger::appender_file(file = stderr()))
One could also just use R's base::cat()
, like so:
base::cat(file = stderr(), 'my string', toString(some_variable), '\n')
...at which point one might consider writing their own little, customized shinyCat(...)
function, which just wraps the above cat()
and automatically sets file = stderr()
.
That's similar to the solution "Sebastian" proposed on StackOverflow:
if (!interactive()) sink(stderr(), type = "output")
Anyway, resolved.
from shiny.
It's also simply more of a 'run shiny from the console directly and see logs' versus 'run shiny server as a daemon and scratch your head where logs are' question that has nothing to do with Rocker, per se.
Still a frequent head-scratcher.
from shiny.
Related Issues (20)
- /usr/bin/shiny-server.sh: no such file or directory error HOT 2
- Shiny version HOT 2
- Remove /tmp/downloaded_packages HOT 4
- no xtail in Shiny:Devel HOT 1
- New Version of Shiny Server HOT 5
- Update shiny-verse to later R-ver HOT 3
- nginx reverse proxy - shiny server issue HOT 1
- request for merge of shiny-verse and verse (i.e. Tidyverse, LaTeX, and Shiny all together) HOT 2
- Can't read environment variable set in docker-compose HOT 5
- Permission denied when running rocker/shiny-verse and rocker/shiny images HOT 4
- Regression for running as non-root user? HOT 6
- Security Vulnerabilities HOT 3
- rocker/shiny-verse latest vs 3.6.3 HOT 4
- rocker/shiny-verse latest vs 3.6.3 HOT 1
- Provide a bootstrap endpoint HOT 1
- doesn't work on ARM architecture HOT 3
- Basic setup for 3.6.3 does not work for 4.0.3? HOT 1
- Missing git tags HOT 1
- Unable to save to mounted volume HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shiny.