You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain(){// Set up very basic logging to the console.
env_logger::init();// Declare our REST API using Rustless, which is much tidier than using// bare Iron APIs.let api = rustless::Api::build(|api| {// ... SNIPPED ...});let app = rustless::Application::new(api);// Put our app into a middleware chain so we can attach the logger,// etc.letmut chain = Chain::new(app);// Call the logger middleware at the beginning and end of our request// chain.let(logger_before, logger_after) = Logger::new(None);
chain.link_before(logger_before);
chain.link_after(logger_after);// Run our web server.println!("Listening on 0.0.0.0:3000");matchIron::new(chain).http("0.0.0.0:3000"){Ok(_) => {},Err(ref e) => println!("Could not start server: {}", e),}}
Running docker run --rm myimage env does not show the TERM variable as being set. But it looks like it's trying to open a terminal anyway, instead of just logging to stdout.
There's probably a way to reproduce this without docker; I'm investigating further.
The text was updated successfully, but these errors were encountered:
If I take a basic Iron app with logger 0.0.3:
…and run it under Docker as:
I get:
Running
docker run --rm myimage env
does not show theTERM
variable as being set. But it looks like it's trying to open a terminal anyway, instead of just logging to stdout.There's probably a way to reproduce this without docker; I'm investigating further.
The text was updated successfully, but these errors were encountered: