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

when a very long log message is printed by LOG(INFO), it will be truncated. #3809

Closed
lcy-seso opened this issue Sep 1, 2017 · 0 comments · Fixed by #3810
Closed

when a very long log message is printed by LOG(INFO), it will be truncated. #3809

lcy-seso opened this issue Sep 1, 2017 · 0 comments · Fixed by #3810
Assignees

Comments

@lcy-seso
Copy link
Contributor

lcy-seso commented Sep 1, 2017

  • PrintLayer.cpp use LOG(INFO) to print a layer's output matrix and sequence information (if the output is a sequence).

  • Float values in a layer's output matrix are first formatted into an ostringstream. Because a layer's output may contain many float numbers (batch size × layer's size, for example, 128 × 128), as a result, the formatted string is always very long.

  • I found when using LOG(INFO) to print such a long formatted string, the string is truncated. (I change LOG(INFO) into std::cout the string can be printed correctly)

  • It seems that the LOG(INFO) macro has a buffer to cache the logging information, and its size is not large enough in my case.

  • I searched and tried GLOG FLAGS defined in glog, but still, do not success to explicitly change the buffer size of LOG(INFO) to print the entire information.

  • Maybe, we should print such a long string part by part?


I searched the codes and found this line: https://github.com/google/glog/blob/a835da8e088273066c32c3cb0e8ff69d54071217/src/logging.cc#L330

I am not sure is the problem caused by this limitation? If so, it seems that this limitation cannot be modified by pre-defined FLAGS?

@lcy-seso lcy-seso changed the title when a very long iog message is printed by LOG(INFO), it will be truncated. when a very long log message is printed by LOG(INFO), it will be truncated. Sep 1, 2017
@lcy-seso lcy-seso self-assigned this Sep 1, 2017
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 a pull request may close this issue.

1 participant