tools/fw-logger/fw-log-data.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2019 Intel Corporation. All Rights Reserved.
3 #include "fw-log-data.h"
4 #include <sstream>
5 #include <iomanip>
6 #include <locale>
7 #include <string>
8 
9 using namespace std;
10 
11 # define SET_WIDTH_AND_FILL(num, element) \
12 setfill(' ') << setw(num) << left << element \
13 
14 namespace fw_logger
15 {
16  fw_log_data::fw_log_data(void)
17  {
18  magic_number = 0;
19  severity = 0;
20  file_id = 0;
21  group_id = 0;
22  event_id = 0;
23  line = 0;
24  sequence = 0;
25  p1 = 0;
26  p2 = 0;
27  p3 = 0;
28  timestamp = 0;
29  delta = 0;
30  message = "";
31  file_name = "";
32  }
33 
34 
35  fw_log_data::~fw_log_data(void)
36  {
37  }
38 
39 
41  {
42  stringstream fmt;
43 
44  fmt << SET_WIDTH_AND_FILL(6, sequence)
46  << SET_WIDTH_AND_FILL(6, group_id)
47  << SET_WIDTH_AND_FILL(15, thread_name)
51  << SET_WIDTH_AND_FILL(15, delta)
53 
54  auto str = fmt.str();
55  return str;
56  }
57 }
GLenum GLuint GLenum GLsizei const GLchar * message
GLenum GLuint GLenum severity
#define SET_WIDTH_AND_FILL(num, element)
std::string to_string(T value)


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:15