Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Convert all stdout/stderr prints to use Log functions #613

Closed
ljbade opened this issue Nov 18, 2014 · 5 comments · Fixed by #984
Closed

Convert all stdout/stderr prints to use Log functions #613

ljbade opened this issue Nov 18, 2014 · 5 comments · Fixed by #984

Comments

@ljbade
Copy link
Contributor

ljbade commented Nov 18, 2014

There is still some code that writes to stdout/stderr instead of the Log functions. For example tile_parser.cpp

This means important error messages never make it to the log on Android and makes debugging harder.

So all code using some sort of print function needs to be found and changed to Log.

Also anywhere that throws a C++ exception needs to also print a Log::Error before it throws in case we don't catch the exception and we crash instead.

@ljbade ljbade changed the title Convert all stdout/stderr prints to use Log functinos Convert all stdout/stderr prints to use Log functions Nov 18, 2014
@ljbade
Copy link
Contributor Author

ljbade commented Nov 19, 2014

Will make a branch on master for this.

@ljbade
Copy link
Contributor Author

ljbade commented Jan 27, 2015

Still need to get on to this.

However I notice some more printfs have crept in, /cc @ansis

@ljbade ljbade added this to the Android Beta milestone Feb 17, 2015
@tmpsantos tmpsantos self-assigned this Mar 10, 2015
@tmpsantos
Copy link
Contributor

@ljbade I can take this one as I'm working also on #882

@ljbade
Copy link
Contributor Author

ljbade commented Mar 11, 2015

Cool @tmpsantos that would be awesome. I found their was a mix of C++ style cout/cerr and the various C APIs such as *printf and a few others.

You will probably want to regex the repo to find them all.

@ljbade
Copy link
Contributor Author

ljbade commented Mar 11, 2015

@jfirebaugh after they have been converted, we will have to make sure everyone knows not to commit code not using the Log. I will try to keep an eye on this in PRs.

tmpsantos added a commit that referenced this issue Mar 12, 2015
Use our logging system that will route the message accordingly on
the target platform.

Fixes #613
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants