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 daemon(1,0) ,then log is missing #357

Closed
bolanbujing opened this issue Aug 22, 2018 · 0 comments
Closed

add daemon(1,0) ,then log is missing #357

bolanbujing opened this issue Aug 22, 2018 · 0 comments

Comments

@bolanbujing
Copy link

if(daemon(1, 0) < 0){
std::cout << "deamon fail"<< std::endl;
return 0;
}
gflags::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]);
google::InstallFailureSignalHandler();
mkdir("./log", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
//google::SetLogDestination(google::GLOG_INFO, "./log/");
FLAGS_alsologtostderr = false;
FLAGS_log_dir = "./log";
FLAGS_logbufsecs = 0;
LOG(INFO) << "HELOO";
LOG(INFO) << "11111";
LOG(INFO) << "22222";
LOG(INFO) << "33333";
LOG(INFO) << "44444";

execute and the result is that log after the 'HELOO' is missing, only left with 'HELOO'

@sergiud sergiud closed this as completed Mar 30, 2021
@sergiud sergiud mentioned this issue May 6, 2021
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

No branches or pull requests

2 participants