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
how to write log into file #117
Comments
Is this your exact code? Note that logs before the Like #83 (comment), you need to call |
yes, that is my code to test. I got the answer, log will write to file from the function after calling is there any way to write in file without calling |
The Flag parsing is typically done by calling But if you do not want command line flags parsing (i.e. always use the default flag values), you can try to call Let me know if this works for you. |
I have tried with following code, but it does not write into files
|
Without using You can e.g. call When using Hope it helps. |
Thank you @yilei Now it works, my code is
|
Hi @yilei! Is this behaviour referenced anywhere in the abseil documentation? Thanks! |
@stefanistrate This is only mentioned in the |
I tried that code, and it did not work. There was only |
@eshijia do you have a minimal but complete reproducible example? snippets aren't great since how/when they are executed is important. |
I have solved the problem. The key point is that if you do not use This code does not work:
But this code works:
|
I have to say that even that this lib comes from Google guys, is not UX friendly. Guys, please add some examples how to use it! I'm working with ml-metadata and they are using your crappy stuff and I have no idea how to enabling logging. And please, add the example with absl.run()! Only thanks to @eshijia I'm able to see what's up not you, creators. |
Hi,
I am trying to write log into file directly instead of showing in command window. I have seen following issues about it
#83
#111
I tried them but I cant see anything in the file.
My code is
I cant see anything in that file though file was created
The text was updated successfully, but these errors were encountered: