| Index: base/vlog.cc
|
| diff --git a/base/vlog.cc b/base/vlog.cc
|
| index 8903f396b86ee4bd8694a418c05573b9105968c8..41bf2a583d861cbc7eea5e42ddb3d17eb7913002 100644
|
| --- a/base/vlog.cc
|
| +++ b/base/vlog.cc
|
| @@ -13,6 +13,18 @@ namespace logging {
|
|
|
| const int VlogInfo::kDefaultVlogLevel = 0;
|
|
|
| +struct VlogInfo::VmodulePattern {
|
| + enum MatchTarget { MATCH_MODULE, MATCH_FILE };
|
| +
|
| + explicit VmodulePattern(const std::string& pattern);
|
| +
|
| + VmodulePattern();
|
| +
|
| + std::string pattern;
|
| + int vlog_level;
|
| + MatchTarget match_target;
|
| +};
|
| +
|
| VlogInfo::VmodulePattern::VmodulePattern(const std::string& pattern)
|
| : pattern(pattern),
|
| vlog_level(VlogInfo::kDefaultVlogLevel),
|
| @@ -64,15 +76,6 @@ VlogInfo::VlogInfo(const std::string& v_switch,
|
|
|
| VlogInfo::~VlogInfo() {}
|
|
|
| -void VlogInfo::SetMaxVlogLevel(int level) {
|
| - // Log severity is the negative verbosity.
|
| - *min_log_level_ = -level;
|
| -}
|
| -
|
| -int VlogInfo::GetMaxVlogLevel() const {
|
| - return -*min_log_level_;
|
| -}
|
| -
|
| namespace {
|
|
|
| // Given a path, returns the basename with the extension chopped off
|
| @@ -109,6 +112,15 @@ int VlogInfo::GetVlogLevel(const base::StringPiece& file) const {
|
| return GetMaxVlogLevel();
|
| }
|
|
|
| +void VlogInfo::SetMaxVlogLevel(int level) {
|
| + // Log severity is the negative verbosity.
|
| + *min_log_level_ = -level;
|
| +}
|
| +
|
| +int VlogInfo::GetMaxVlogLevel() const {
|
| + return -*min_log_level_;
|
| +}
|
| +
|
| bool MatchVlogPattern(const base::StringPiece& string,
|
| const base::StringPiece& vlog_pattern) {
|
| base::StringPiece p(vlog_pattern);
|
|
|