mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
684fa29593
Summary: Update the folly::Init code to define a `--logging` command line flag, and call `folly::initLoggingOrDie()` with the value of this command line during initialization. This is similar to the existing code that initializes the glog library. (Programs can use both glog and folly logging together in the same program, and I expect that many programs will do so as parts get converted to folly::logging and parts remain using glog.) Reviewed By: yfeldblum Differential Revision: D7827344 fbshipit-source-id: 8aa239fbad43bc0b551cbe40cad7b92fa97fcdde
22 lines
605 B
C++
22 lines
605 B
C++
/*
|
|
* Copyright (c) 2004-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*
|
|
*/
|
|
#include <folly/init/Init.h>
|
|
#include <gtest/gtest.h>
|
|
|
|
int main(int argc, char* argv[]) {
|
|
testing::InitGoogleTest(&argc, argv);
|
|
folly::init(&argc, &argv);
|
|
|
|
// The FuseChannel code sends SIGPIPE and expects it to be ignored.
|
|
::signal(SIGPIPE, SIG_IGN);
|
|
|
|
return RUN_ALL_TESTS();
|
|
}
|