Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamps and tid to logging output. #141

Merged
merged 1 commit into from
Mar 8, 2016

Conversation

dhylands
Copy link
Contributor

@dhylands dhylands commented Mar 5, 2016

This also sets the default logging level to INFO.

You can still override this by running foxbox using:

RUST_LOG=foxbox=debug cargo run

@dhylands
Copy link
Contributor Author

dhylands commented Mar 5, 2016

r? @fabrice

@dhylands
Copy link
Contributor Author

dhylands commented Mar 5, 2016

r? @fabricedesre (gotta spell it right)

@fabricedesre
Copy link
Collaborator

Hm, it's sad that nix doesn't provide gettid() since we already depend on it. Maybe you can send them a PR (https://github.com/nix-rust/nix) instead of adding this custom sub-crate?

@dhylands
Copy link
Contributor Author

dhylands commented Mar 5, 2016

Hm, it's sad that nix doesn't provide gettid() since we already depend on it. Maybe you can send them a PR (https://github.com/nix-rust/nix) instead of adding this custom sub-crate?

I created nix-rust/nix#293 let's see if I can get that landed.

@dhylands
Copy link
Contributor Author

dhylands commented Mar 8, 2016

gettid is now in nix (currently just on github, it hasn't made it to a crate yet, but will show up in nix 0.5.1)

So I rebased to the latest master and dropped the sub-crate. Do we need foxbox to build on non-linux platforms? If yes, I can add support so that the gettid field isn't shown on non-linux platforms.

@fabricedesre
Copy link
Collaborator

We have people building on mac, so hiding the thread id on non-linux is a must, yes.

@dhylands
Copy link
Contributor Author

dhylands commented Mar 8, 2016

Updated so that it only tries to call gettid if building for linux or android (the same platforms which nix::unistd::gettid is available).

fabricedesre added a commit that referenced this pull request Mar 8, 2016
Add timestamps and tid to logging output.
@fabricedesre fabricedesre merged commit e94ca8a into fxbox:master Mar 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants