BlueHeron.HCIDump.Logger (blue_heron v0.4.1) View Source

Wrapper around Elixir's Logger to facilitate HCI Logging.

Usage:

iex> require BlueHeron.HCIDump.Logger, as: Logger
BlueHeron.HCIDump.Logger

iex> Logger.debug "hey"
:ok

16:05:03.577 [debug] hey

iex> BlueHeron.HCIDump.decode_file!("/tmp/hcidump.pklg")
[%BlueHeron.HCIDump.PKTLOG{payload: "hey", tv_sec: 1597075503, tv_us: 577, type: :LOG_MESSAGE_PACKET}]

Link to this section Summary

Link to this section Functions

Link to this macro

debug(chardata_or_fun, metadata \\ [])

View Source (macro)

See Elixir.Logger.debug/2

Link to this macro

error(chardata_or_fun, metadata \\ [])

View Source (macro)

See Elixir.Logger.error/2

Link to this macro

hci_packet(type, direction, payload, metadata \\ [])

View Source (macro)

HCI Packet Logger type must be one of

:HCI_COMMAND_DATA_PACKET,
:HCI_ACL_DATA_PACKET,
:HCI_SCO_DATA_PACKET,
:HCI_EVENT_PACKET,
:LOG_MESSAGE_PACKET

direction must be one of

:in,
:out

payload must be a binary. metadata is optional metadata to pass through to Elixir.Logger

Link to this macro

info(chardata_or_fun, metadata \\ [])

View Source (macro)

See Elixir.Logger.info/2

Link to this macro

warning(chardata_or_fun, metadata \\ [])

View Source (macro)

See Elixir.Logger.warning/2