本文介绍LT模块提供给自适应应用程序的API
修改编号<br />No. | 版本<br />Version | 修改内容<br /> Contents Revised | 状态<br />Status | 日期<br />Date |
---|---|---|---|---|
1 | 0.5 | 新版本 | Draft | 2022.6.30 |
2 | 0.7 | 评审版本 | In review | 2022.6.30 |
3 | 1.0 | 审核通过 | Approved | 2022.7.13 |
4 | 1.5 | 根据sws 21-11规范,修改或新增如下API和类型 <br />Logger& CreateLogger(ara::core::StringView ctxId, ara::core::String View ctxDescription, <br />Logger& CreateLogger(ara::core::StringView ctxId, ara::core::String View ctxDescription, <br />LogLevel ctxDefLogLevel=LogLevel::kWarn)noexcept;<br />constexpr LogHex8 HexFormat(std::uint8_t value) noexcept;<br />constexpr LogHex8 HexFormat(std::int8_t value) noexcept;<br />constexpr LogHex16 HexFormat(std::uint16_t value) noexcept;<br />constexpr LogHex16 HexFormat(std::int16_t value) noexcept;<br />constexpr LogHex32 HexFormat(std::uint32_t value) noexcept;<br />constexpr LogHex32 HexFormat(std::int32_t value) noexcept;<br />constexpr LogHex64 HexFormat(std::uint64_t value) noexcept;<br />constexpr LogHex64 HexFormat(std::int64_t value) noexcept;<br />constexpr LogBin8 BinFormat(std::uint8_t value) noexcept;<br />constexpr LogBin8 BinFormat(std::int8_t value) noexcept;<br />constexpr LogBin16 BinFormat(std::uint16_t value) noexcept;<br />constexpr LogBin16 BinFormat(std::int16_t value) noexcept;<br />constexpr LogBin32 BinFormat(std::uint32_t value) noexcept;<br />constexpr LogBin32 BinFormat(std::int32_t value) noexcept;<br />constexpr LogBin64 BinFormat(std::uint64_t value) noexcept;<br />constexpr LogBin64 BinFormat(std::int64_t value) noexcept;<br />void RegisterConnectionStateHandler(std::function< void(ClientState)> callback) noexcept;<br />template <typename T> Argument<T> Arg(T &&arg, const char *name=nullptr, const char *unit=nullptr, Format format=Dflt()) noexcept;<br />template <typename T> LogStream& operator<<(const Argument< T > &arg) noexcept;<br /><br />class ara::log::LogStream<br />void Flush () noexcept;<br />LogStream& ara::log::LogStream::operator<<bool value) noexcept;<br />LogStream& ara::log::LogStream::operator<<std::uint8_t value) noexcept;<br />LogStream& ara::log::LogStream::operator<<std::uint16_t value) noexcept;<br />LogStream& ara::log::LogStream::operator<<std::uint32_t value) noexcept;<br />LogStream& ara::log::LogStream::operator<<std::uint64_t value) noexcept;<br />LogStream& ara::log::LogStream::operator<<std::int8_t value) noexcept;<br />LogStream& ara::log::LogStream::operator<<std::int16_t value) noexcept;<br />LogStream& ara::log::LogStream::operator<<std::int32_t value) noexcept;<br />LogStream& ara::log::LogStream::operator<<std::int64_t value) noexcept;<br />LogStream& ara::log::LogStream::operator<<float value) noexcept;<br />LogStream& ara::log::LogStream::operator<<double value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const LogHex8 &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const LogHex16 &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const LogHex32 &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const LogHex64 &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const LogBin8 &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const LogBin16 &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const LogBin32 &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const LogBin64 &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const ara::core::StringView value) noexcept;<br />LogStream& ara::log::LogStream::operator<<const char *const value) noexcept;<br />LogStream& ara::log::LogStream::operator<<LogStream &out, LogLevel value) noexcept;<br />LogStream& ara::log::LogStream::operator<<LogStream &out, const core::ErrorCode &ec) noexcept;<br />template <typename Rep, typename Period> LogStream& operator<< (LogStream &out, const std::chrono::duration<Rep, Period > &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<(LogStream &out, const ara::core::InstanceSpecifier &value) noexcept;<br />LogStream& ara::log::LogStream::operator<<(LogStream &out, const void *const value)noexcept;<br />LogStream& ara::log::LogStream::operator<<(core::Span< const core::Byte > data) noexcept;<br />LogStream& ara::log::LogStream::WithLocation(core::StringView file, int line) noexcept;<br /><br />class ara::log::Logger<br />LogStream ara::log::Logger::LogFatal() const noexcept;<br />LogStream ara::log::Logger::LogError() const noexcept;<br />LogStream ara::log::Logger::LogWarn() const noexcept;<br />LogStream ara::log::Logger::LogInfo() const noexcept;<br />LogStream ara::log::Logger::LogDebug() const noexcept;<br />LogStream ara::log::Logger::LogVerbose() const noexcept;<br />bool ara::log::Logger::IsEnabled(LogLevel logLevel) const noexcept;<br />LogStream ara::log::Logger::WithLevel(LogLevel logLevel) const noexcept; | Draft | 2022.8.11 |
5 | 1.7 | 评审版本 | In review | 2022.10.01 |
6 | 2.0 | 评审通过 | Approved | 2022.10.11 |
7 | 2.5 | LT API结构调整 | Draft | 2022.11.21 |
8 | 2.7 | 评审版本 | In review | 2022.11.21 |
9 | 3.0 | 评审通过 | Approved | 2022.11.21 |