comparison common/logger.cpp @ 23:03068f5ed79d

Misc: various style issues, #419
author David Demelier <markand@malikania.fr>
date Sun, 14 Feb 2016 16:15:48 +0100
parents 1158cffe5a5e
children
comparison
equal deleted inserted replaced
22:23d59afec277 23:03068f5ed79d
54 * Create the buffer with the specified level. 54 * Create the buffer with the specified level.
55 * 55 *
56 * @param level the level 56 * @param level the level
57 */ 57 */
58 inline Buffer(Level level) noexcept 58 inline Buffer(Level level) noexcept
59 : m_level{level} 59 : m_level(level)
60 { 60 {
61 } 61 }
62 62
63 /** 63 /**
64 * Update the underlying interface. 64 * Update the underlying interface.
124 124
125 /* Generic interface for all outputs */ 125 /* Generic interface for all outputs */
126 std::unique_ptr<Interface> iface; 126 std::unique_ptr<Interface> iface;
127 127
128 /* Internal buffers */ 128 /* Internal buffers */
129 Buffer bufferInfo{Level::Info}; 129 Buffer bufferInfo(Level::Info);
130 Buffer bufferWarning{Level::Warning}; 130 Buffer bufferWarning(Level::Warning);
131 Buffer bufferDebug{Level::Debug}; 131 Buffer bufferDebug(Level::Debug);
132 132
133 /* Stream outputs */ 133 /* Stream outputs */
134 std::ostream streamInfo{&bufferInfo}; 134 std::ostream streamInfo(&bufferInfo);
135 std::ostream streamWarning{&bufferWarning}; 135 std::ostream streamWarning(&bufferWarning);
136 std::ostream streamDebug{&bufferDebug}; 136 std::ostream streamDebug(&bufferDebug);
137 137
138 /* Options */ 138 /* Options */
139 bool verbose{false}; 139 bool verbose(false);
140 140
141 } // !namespace 141 } // !namespace
142 142
143 /* -------------------------------------------------------- 143 /* --------------------------------------------------------
144 * Console 144 * Console
155 /* -------------------------------------------------------- 155 /* --------------------------------------------------------
156 * File 156 * File
157 * -------------------------------------------------------- */ 157 * -------------------------------------------------------- */
158 158
159 File::File(std::string normal, std::string errors) 159 File::File(std::string normal, std::string errors)
160 : m_outputNormal{std::move(normal)} 160 : m_outputNormal(std::move(normal))
161 , m_outputError{std::move(errors)} 161 , m_outputError(std::move(errors))
162 { 162 {
163 } 163 }
164 164
165 void File::write(Level level, const std::string &line) noexcept 165 void File::write(Level level, const std::string &line) noexcept
166 { 166 {