• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "tools/trace_to_text/proto_full_utils.h"
18 
19 namespace perfetto {
20 namespace trace_to_text {
21 
22 MultiFileErrorCollectorImpl::~MultiFileErrorCollectorImpl() = default;
23 
AddError(const std::string & filename,int line,int column,const std::string & message)24 void MultiFileErrorCollectorImpl::AddError(const std::string& filename,
25                                            int line,
26                                            int column,
27                                            const std::string& message) {
28   PERFETTO_ELOG("Error %s %d:%d: %s", filename.c_str(), line, column,
29                 message.c_str());
30 }
31 
AddWarning(const std::string & filename,int line,int column,const std::string & message)32 void MultiFileErrorCollectorImpl::AddWarning(const std::string& filename,
33                                              int line,
34                                              int column,
35                                              const std::string& message) {
36   PERFETTO_ELOG("Error %s %d:%d: %s", filename.c_str(), line, column,
37                 message.c_str());
38 }
39 
40 }  // namespace trace_to_text
41 }  // namespace perfetto
42