Log listening host and port #218

Merged
merged 2 commits into from Sep 7, 2016

Projects

None yet

2 participants

@andreastt
Member
andreastt commented Sep 6, 2016 edited

These patches make use of the return value in webdriver::server::start introduced in webdriver-rust 0.14 by printing the host and port to stderr after we bind and the HTTPD has spun up.


This change is Reviewable

@andreastt
Member
@jgraham
Collaborator
jgraham commented Sep 7, 2016

Reviewed 2 of 3 files at r1.
Review status: 2 of 3 files reviewed at latest revision, 3 unresolved discussions.


src/main.rs, line 29 [r1] (raw file):

}

macro_rules! print_err {

Why aren't we just using the log crate rather than creating a custom macro here? I feel like this got super-complicated for not too much benefit.


src/main.rs, line 154 [r1] (raw file):

    let handler = MarionetteHandler::new(settings);
    match webdriver::server::start(addr, handler, extension_routes()) {
try!(webdriver::server::start([…])
       .or(Err((ExitCode::Usage, "invalid host address".to_owned())));
 print_err!("Listening on {}", listening.socket);

src/main.rs, line 158 [r1] (raw file):

            print_err!("listening on {}", listening.socket);
            Ok(())

Did you add trailing whitespace here? Reviewable is inscrutable.


Comments from Reviewable

@jgraham
Collaborator
jgraham commented Sep 7, 2016

Reviewed 1 of 3 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions.


Comments from Reviewable

andreastt added some commits Sep 6, 2016
@andreastt andreastt log host and port after starting httpd
Note that the info level log messages will not appear unless RUST_LOG
is set to info or a more verbose level.
799ca18
@andreastt andreastt update webdriver-rust to 0.14
e61b8c4
@andreastt
Member

Review status: 2 of 3 files reviewed at latest revision, 3 unresolved discussions.


src/main.rs, line 154 [r1] (raw file):

Previously, jgraham wrote…

try!(webdriver::server::start([…])
       .or(Err((ExitCode::Usage, "invalid host address".to_owned())));
 print_err!("Listening on {}", listening.socket);
Done.

src/main.rs, line 158 [r1] (raw file):

Previously, jgraham wrote…

Did you add trailing whitespace here? Reviewable is inscrutable.

Oops.

Comments from Reviewable

@andreastt
Member

Review status: 2 of 3 files reviewed at latest revision, 3 unresolved discussions.


src/main.rs, line 158 [r1] (raw file):

Previously, andreastt (Andreas Tolfsen) wrote…

Oops.

Done.

Comments from Reviewable

@jgraham
Collaborator
jgraham commented Sep 7, 2016

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions.


Comments from Reviewable

@andreastt andreastt changed the title from Print listening host and port to Log listening host and port Sep 7, 2016
@andreastt andreastt merged commit acfde73 into mozilla:master Sep 7, 2016

0 of 2 checks passed

code-review/reviewable 1 file, 2 discussions left (andreastt, jgraham)
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment