diff --git a/interfaces/native/innerkits/include/hilog/log_cpp.h b/interfaces/native/innerkits/include/hilog/log_cpp.h index 76c9543d026e4061a7737846b824d9fbb5f2f913..1077e205dbe0c7acc4078e5c0318d00f72304cd2 100644 --- a/interfaces/native/innerkits/include/hilog/log_cpp.h +++ b/interfaces/native/innerkits/include/hilog/log_cpp.h @@ -34,19 +34,20 @@ using HiLogLabel = struct { const char *tag; }; -/** - * @brief Hilog C++ class interface of different log level. - * Debug: Designates lower priority log. - * Info: Designates useful information. - * Warn: Designates hazardous situations. - * Error: Designates very serious errors. - * Fatal: Designates major fatal anomaly. - * - * @param label HiLogLabel for the log - * @param fmt Format string for the log - */ + class HiLog final { public: + /** + * @brief Hilog C++ class interface of different log level. + * Debug: Designates lower priority log. + * Info: Designates useful information. + * Warn: Designates hazardous situations. + * Error: Designates very serious errors. + * Fatal: Designates major fatal anomaly. + * + * @param label HiLogLabel for the log + * @param fmt Format string for the log + */ static int Debug(const HiLogLabel &label, const char *fmt, ...) __attribute__((__format__(os_log, 2, 3))); static int Info(const HiLogLabel &label, const char *fmt, ...) __attribute__((__format__(os_log, 2, 3))); static int Warn(const HiLogLabel &label, const char *fmt, ...) __attribute__((__format__(os_log, 2, 3))); diff --git a/interfaces/native/innerkits/include/hilog_trace.h b/interfaces/native/innerkits/include/hilog_trace.h index b370c93cc70ba62912299db11441df3253db8bc7..1e004c37069d242e15afc64004266dcf70c9ed2b 100644 --- a/interfaces/native/innerkits/include/hilog_trace.h +++ b/interfaces/native/innerkits/include/hilog_trace.h @@ -12,34 +12,34 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#ifndef HIVIEWDFX_HILOG_TRACE_H -#define HIVIEWDFX_HILOG_TRACE_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef int (*RegisterFunc)(uint64_t*, uint32_t*, uint64_t*, uint64_t*); - + +#ifndef HIVIEWDFX_HILOG_TRACE_H +#define HIVIEWDFX_HILOG_TRACE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef int (*RegisterFunc)(uint64_t*, uint32_t*, uint64_t*, uint64_t*); + /** * @brief register hilog trace. * - * @param RegisterFunc Function pointer to RegisterFunc + * @param func Function pointer to RegisterFunc */ -int HiLogRegisterGetIdFun(RegisterFunc); +int HiLogRegisterGetIdFun(RegisterFunc func); /** * @brief unregister hilog trace. * - * @param RegisterFunc Function pointer to RegisterFunc + * @param func Function pointer to RegisterFunc */ -void HiLogUnregisterGetIdFun(RegisterFunc); - -#ifdef __cplusplus -} -#endif - -#endif // HIVIEWDFX_HILOG_TRACE_H +void HiLogUnregisterGetIdFun(RegisterFunc func); + +#ifdef __cplusplus +} +#endif + +#endif // HIVIEWDFX_HILOG_TRACE_H