3
3
4
4
#include < string>
5
5
6
- #include " FileDecompressor.hpp"
7
-
8
6
#include < boost/filesystem.hpp>
7
+
9
8
#include " ../ir/constants.hpp"
10
9
#include " ../ir/LogEventSerializer.hpp"
10
+ #include " FileDecompressor.hpp"
11
11
12
12
using clp::ir::four_byte_encoded_variable_t ;
13
13
using clp::ir::LogEventSerializer;
@@ -39,9 +39,9 @@ auto FileDecompressor::decompress_to_ir(
39
39
ErrorCode_Success != error_code)
40
40
{
41
41
SPDLOG_ERROR (
42
- " Failed to create directory structure {}, errno={}" ,
43
- temp_output_dir.c_str (),
44
- errno
42
+ " Failed to create directory structure {}, errno={}" ,
43
+ temp_output_dir.c_str (),
44
+ errno
45
45
);
46
46
return false ;
47
47
}
@@ -64,7 +64,7 @@ auto FileDecompressor::decompress_to_ir(
64
64
while (archive_reader.get_next_message (m_encoded_file, m_encoded_message)) {
65
65
if (false
66
66
== archive_reader
67
- .decompress_message_without_ts (m_encoded_message, m_decompressed_message))
67
+ .decompress_message_without_ts (m_encoded_message, m_decompressed_message))
68
68
{
69
69
SPDLOG_ERROR (" Failed to decompress message" );
70
70
return false ;
@@ -75,12 +75,7 @@ auto FileDecompressor::decompress_to_ir(
75
75
76
76
auto const end_message_ix = begin_message_ix + ir_serializer.get_num_log_events ();
77
77
if (false
78
- == ir_output_handler (
79
- temp_ir_path,
80
- file_orig_id,
81
- begin_message_ix,
82
- end_message_ix
83
- ))
78
+ == ir_output_handler (temp_ir_path, file_orig_id, begin_message_ix, end_message_ix))
84
79
{
85
80
return false ;
86
81
}
@@ -94,14 +89,14 @@ auto FileDecompressor::decompress_to_ir(
94
89
95
90
if (false
96
91
== ir_serializer.serialize_log_event (
97
- m_encoded_message.get_ts_in_milli (),
98
- m_decompressed_message
99
- ))
92
+ m_encoded_message.get_ts_in_milli (),
93
+ m_decompressed_message
94
+ ))
100
95
{
101
96
SPDLOG_ERROR (
102
- " Failed to serialize log event: {} with ts {}" ,
103
- m_decompressed_message.c_str (),
104
- m_encoded_message.get_ts_in_milli ()
97
+ " Failed to serialize log event: {} with ts {}" ,
98
+ m_decompressed_message.c_str (),
99
+ m_encoded_message.get_ts_in_milli ()
105
100
);
106
101
return false ;
107
102
}
@@ -111,9 +106,7 @@ auto FileDecompressor::decompress_to_ir(
111
106
112
107
// NOTE: We don't remove temp_output_dir because we don't know if it existed before this method
113
108
// was called.
114
- if (false
115
- == ir_output_handler (temp_ir_path, file_orig_id, begin_message_ix, end_message_ix))
116
- {
109
+ if (false == ir_output_handler (temp_ir_path, file_orig_id, begin_message_ix, end_message_ix)) {
117
110
return false ;
118
111
}
119
112
@@ -122,4 +115,4 @@ auto FileDecompressor::decompress_to_ir(
122
115
}
123
116
}; // namespace clp::clp
124
117
125
- #endif // CLP_CLP_FILEDECOMPRESSOR_INC
118
+ #endif // CLP_CLP_FILEDECOMPRESSOR_INC
0 commit comments