@@ -58,200 +58,51 @@ class LogClass {
5858 void end ();
5959
6060 /* *
61- * @brief Outputs a string with the ERROR log level.
62- *
63- * @param str [in] String to output.
61+ * In the following level functions, we explicitly use the postfix of v to
62+ * specify that we pass on a va_list. In this way, the compiler is not
63+ * confused between calling e.g. infof with a va_list and calling infofv (as
64+ * we should if we're passing on a va_list).
6465 */
65- void error (const char str[]);
6666
67- /* *
68- * @brief Outputs a string with the error log level.
69- *
70- * @param str [in] String to output.
71- */
67+ void error (const char str[]);
7268 void error (const String str);
73-
74- /* *
75- * @brief Outputs a string with the error log level, where the string is
76- * stored in program memory.
77- *
78- * @param str [in] String to output.
79- */
8069 void error (const __FlashStringHelper* str);
81-
82- /* *
83- * @brief Outputs a string with the error log level and optional formatting.
84- *
85- * @param format [in] Format string.
86- * @param ... [in] Arguments for formatting.
87- */
8870 void errorf (const char * format, ...);
89-
90- /* *
91- * @brief Outputs a string with the error log level and optional formatting,
92- * where the formatting is stored in program memory.
93- *
94- * @param format [in] Format string.
95- * @param ... [in] Arguments for formatting.
96- */
71+ void errorfv (const char * format, va_list args);
9772 void errorf (const __FlashStringHelper* format, ...);
73+ void errorfv (const __FlashStringHelper* format, va_list args);
9874
99- /* *
100- * @brief Outputs a string with the warning log level.
101- *
102- * @param str [in] String to output.
103- */
10475 void warn (const char str[]);
105-
106- /* *
107- * @brief Outputs a string with the warning log level.
108- *
109- * @param str [in] String to output.
110- */
11176 void warn (const String str);
112-
113- /* *
114- * @brief Outputs a string with the warning log level, where the string is
115- * stored in program memory.
116- *
117- * @param str [in] String to output.
118- */
11977 void warn (const __FlashStringHelper* str);
120-
121- /* *
122- * @brief Outputs a string with the warning log level and optional
123- * formatting.
124- *
125- * @param format [in] Format string.
126- * @param ... [in] Arguments for formatting.
127- */
12878 void warnf (const char * format, ...);
129-
130- /* *
131- * @brief Outputs a string with the warning log level and optional
132- * formatting, where the formatting is stored in program memory.
133- *
134- * @param format [in] Format string.
135- * @param ... [in] Arguments for formatting.
136- */
79+ void warnfv (const char * format, va_list args);
13780 void warnf (const __FlashStringHelper* format, ...);
81+ void warnfv (const __FlashStringHelper* format, va_list args);
13882
139- /* *
140- * @brief Outputs a string with the info log level.
141- *
142- * @param str [in] String to output.
143- */
14483 void info (const char str[]);
145-
146- /* *
147- * @brief Outputs a string with the info log level.
148- *
149- * @param str [in] String to output.
150- */
15184 void info (const String str);
152-
153- /* *
154- * @brief Outputs a string with the info log level, where the string is
155- * stored in program memory.
156- *
157- * @param str [in] String to output.
158- */
15985 void info (const __FlashStringHelper* str);
160-
161- /* *
162- * @brief Outputs a string with the info log level and optional formatting.
163- *
164- * @param format [in] Format string.
165- * @param ... [in] Arguments for formatting.
166- */
16786 void infof (const char * format, ...);
168-
169- /* *
170- * @brief Outputs a string with the info log level and optional formatting,
171- * where the formatting is stored in program memory.
172- *
173- * @param format [in] Format string.
174- * @param ... [in] Arguments for formatting.
175- */
87+ void infofv (const char * format, va_list args);
17688 void infof (const __FlashStringHelper* format, ...);
89+ void infofv (const __FlashStringHelper* format, va_list args);
17790
178- /* *
179- * @brief Outputs a string with the debug log level.
180- *
181- * @param str [in] String to output.
182- */
18391 void debug (const char str[]);
184-
185- /* *
186- * @brief Outputs a string with the debug log level.
187- *
188- * @param str [in] String to output.
189- */
19092 void debug (const String str);
191-
192- /* *
193- * @brief Outputs a string with the debug log level, where the string is
194- * stored in program memory.
195- *
196- * @param str [in] String to output.
197- */
19893 void debug (const __FlashStringHelper* str);
199-
200- /* *
201- * @brief Outputs a string with the debug log level and optional formatting.
202- *
203- * @param format [in] Format string.
204- * @param ... [in] Arguments for formatting.
205- */
20694 void debugf (const char * format, ...);
207-
208- /* *
209- * @brief Outputs a string with the debug log level and optional formatting,
210- * where the formatting is stored in program memory.
211- *
212- * @param format [in] Format string.
213- * @param ... [in] Arguments for formatting.
214- */
95+ void debugfv (const char * format, va_list args);
21596 void debugf (const __FlashStringHelper* format, ...);
97+ void debugfv (const __FlashStringHelper* format, va_list args);
21698
217- /* *
218- * @brief Outputs a string without log level..
219- *
220- * @param str [in] String to output.
221- */
22299 void raw (const char str[]);
223-
224- /* *
225- * @brief Outputs a string without log level.
226- *
227- * @param str [in] String to output.
228- */
229100 void raw (const String str);
230-
231- /* *
232- * @brief Outputs a string without log level, where the string is stored in
233- * program memory.
234- *
235- * @param str [in] String to output.
236- */
237101 void raw (const __FlashStringHelper* str);
238-
239- /* *
240- * @brief Outputs a string without log level and optional formatting.
241- *
242- * @param format [in] Format string.
243- * @param ... [in] Arguments for formatting.
244- */
245102 void rawf (const char * format, ...);
246-
247- /* *
248- * @brief Outputs a string without log level and optional formatting, where
249- * the formatting is stored in program memory.
250- *
251- * @param format [in] Format string.
252- * @param ... [in] Arguments for formatting.
253- */
103+ void rawfv (const char * format, va_list args);
254104 void rawf (const __FlashStringHelper* format, ...);
105+ void rawfv (const __FlashStringHelper* format, va_list args);
255106
256107 private:
257108 /* *
0 commit comments