/**
* @brief Enumeration for timestamp-based log sorting orderings
+ * @details Log messages get up to 4 different timestamps which don't necessarily produce the same ordering.
+ * This enum lets you specify which ordering you want in given context.
* @since_tizen 6.0
* @remarks For information on the timestamp documentation, refer to @ref CAPI_SYSTEM_DLOGUTIL_OVERVIEW.
*/
/**
* @brief A struct containing the metadata and contents for a single dlog entry.
+ * @details An individual log, received after all filters were applied.
+ * @bug Currently missing a dlogutil_entry_destroy() function. Use regular libc free().
* @since_tizen 6.0
*/
typedef struct dlogutil_entry dlogutil_entry_s;
/**
* @brief Retrieves the TID (thread identificator) of the log sender.
+ * @details Retrieves the TID who sent a log, useful for debugging multithreaded programs.
* @since_tizen 6.0
* @remarks If LOG_ID_KMSG is used as the buffer, this function will always return
* TIZEN_ERROR_NO_DATA. This is because the KMSG buffer contains no TID information.
/**
* @brief Retrieves the PID (process identificator) of the log sender.
+ * @details Retrieves the PID who sent a log, useful for debugging in a multi-program environment.
* @since_tizen 6.0
* @remarks If LOG_ID_KMSG is used as the buffer, this function will always return
* TIZEN_ERROR_NO_DATA. This is because the KMSG buffer contains no PID information.
/**
* @brief Retrieves the tag (arbitrary label) of the log entry.
+ * @details Gets the log's tag, which has two main purposes.
+ * One is to identify multiple instances of the same program.
+ * The other is to identify subcomponents of a program, e.g. libraries.
* @since_tizen 6.0
* @remarks The tag is owned by the entry so do not free nor modify it.
* In some rare cases the entry may be malformed and the message may turn out to be unavailable.
/**
* @brief Retrieves the message (without any metadata) of the log entry.
+ * @details Gets the raw message itself, which is the essence of a log.
* @since_tizen 6.0
* @remarks The message is owned by the entry so do not free nor modify it.
* In some rare cases the entry may be malformed and the message may turn out to be unavailable.
/**
* @brief Retrieves the timestamp of given type from the log entry.
+ * @details Gets the timestamp of a log, which lets you know when it was sent.
* @since_tizen 6.0
* @remarks The information about timestamp availability can be retrieved using the dlogutil_buffer_check_ts_type_available() function.
* For information on the timespec struct, refer to the clock_gettime(2) manpage.
/**
* @brief Retrieves the priority level metadata of the log entry.
+ * @details Checks how important the log was. Note that you only receive logs
+ * that pass any priority filters you set, so you don't need to worry about chaff.
* @since_tizen 6.0
* @param[in] entry Log entry
* @param[out] prio Log priority
/**
* @brief A struct containing libdlogutil initialisation configuration.
+ * @details This is the handle to a one-time setup you have to do before sending a log retrieval request.
* @since_tizen 6.0
*/
typedef struct dlogutil_config dlogutil_config_s;
/**
* @brief Creates a new #dlogutil_config_s struct to be filled with configuration.
+ * @details Creates a config to be filled in, this is the first function you should call.
* @since_tizen 6.0
* @remarks Needs to be freed using dlogutil_config_destroy().
* @return A handle to the new struct, or NULL if out of memory
/**
* @brief Destroys the #dlogutil_config_s struct and cleans up its memory.
+ * @details Frees resources of a config. Call it after you've connected and received a dlogutil state.
* @since_tizen 6.0
* @param[in] config A handle to the settings struct
* @see dlogutil_config_create()
/**
* @brief Enables retrieving only those logs that are logged by the thread with the given TID.
- * @remarks Useful for dumping the logs of a specific thread in a multithreaded process.
+ * @details Filters by TID. Useful for dumping the logs of a specific thread in a multithreaded process.
* @since_tizen 6.0
* @param[in] config A handle to the settings struct
* @param[in] tid The TID value
/**
* @brief Enables retrieving only those logs that are logged by the process with the given PID.
- * @remarks Useful for dumping the logs of a specific process.
+ * @details Filters by PID. Useful for dumping the logs of a specific process.
* @since_tizen 6.0
* @param[in] config A handle to the settings struct.
* @param[in] pid The PID value.
/**
* @brief Enables retrieving only those logs that match a given filter.
+ * @details Filters by tag and priority. Useful for dumping logs of a specific program or subcomponent, or of sufficient importance.
* @since_tizen 6.0
* @param[in] config A handle to the settings struct.
* @param[in] query The filter query. For syntax, see dlogutil's --help or @ref CAPI_SYSTEM_DLOG_UTIL documentation.
/**
* @brief Disables log sorting for given log retrieval request.
- * @remarks Logs are still received in some order that is usually largely sorted,
+ * @details Logs are still received in some order that is usually largely sorted,
* but if sorting is disabled logutil-side there may be cases where a log
* with a later timestamp is in front of a log with an earlier one.
* The use case here is performance, since the failure case above is rare.
/**
* @brief Enables log sorting for given log retrieval request.
* @since_tizen 6.0
- * @remarks This is the default and generally makes sure that logs are in order,
+ * @details Makes sure logs are sorted. This is the default
* but has a modest performance cost.
* @param[in] config A handle to the settings struct
* @return An error code
/**
* @brief Chooses a timestamp type by which returned logs are sorted by
* @since_tizen 6.0
- * @remarks If the chosen timestamp is missing in the logs, currently they will not be sorted at all.
+ * @details If the chosen timestamp is missing in the logs, currently they will not be sorted at all.
* This should, however, still become a reasonable order, since logs are usually stored
* sorted by one of timestamps.
* If only some logs are missing the chosen timestamp, ordering of the logs is undefined.
/**
* @brief Adds a buffer whence logs will be taken to a request.
+ * @details Specifies which buffer to retrieve logs from. Usually this will be main or apps.
* @since_tizen 6.0
* @param[in] config A handle to the settings struct
* @param[in] buf The buffer ID to add to the handled set
/**
* @brief Enables the full dump mode which prints every stored log
+ * @details Pass this constant when you want to dump everything and not just N most recent logs.
* @since_tizen 6.0
* @see dlogutil_config_mode_set_dump()
*/
/**
* @brief A struct containing the state of a log handling request
+ * @details Represents a connection to dlog backend. You can't change config
+ * anymore at this point, but can start retrieving logs.
* @since_tizen 6.0
*/
typedef struct dlogutil_state dlogutil_state_s;
/**
* @brief Destroys the #dlogutil_state_s struct and frees its memory
+ * @details Use after you're done retrieving logs and are cleaning up.
* @since_tizen 6.0
* @param[in] state A handle to the state struct
* @see dlogutil_config_connect()
/**
* @brief Set log retrieval mode to retrieving all the logs since the start of the system without an end.
+ * @details Essentially a dump, followed by monitoring. See those modes.
* @since_tizen 6.0
* @remarks This is similar to dlogutil in a default mode.
* @param[in,out] config The configuration struct
/**
* @brief Set log retrieval mode to retrieving all the logs since the call without an end.
+ * @details Will only retrieve new logs. Any logs present before the connection are ignored. Good for live debugging.
* @since_tizen 6.0
* @remarks This is similar to dlogutil -m.
* @param[in,out] config The configuration struct
/**
* @brief Set log retrieval mode to dumping all the logs since the start of the system until the call
* (possibly a specified amount of the most recent of them instead).
+ * @details Will only retrieve existing logs. Any logs incoming after the connection are ignored. Good for avoiding floods.
* @since_tizen 6.0
* @remarks This is similar to dlogutil -d. After dumping all the logs, dlogutil_get_log() will signal this by returning TIZEN_ERROR_NO_DATA.
* @param[in,out] config The configuration struct
/**
* @brief Set log retrieval mode to dumping compressed historical logs
+ * @details Similar to the dump mode, but works on a named compressed buffer.
* @since_tizen 7.0
* @remarks This is similar to `cat /var/log/dlog/xyz`. After dumping all the logs, dlogutil_get_log() will signal this by returning TIZEN_ERROR_NO_DATA.
* @param[in,out] config The configuration struct
/**
* @brief Finalizes the config into a state struct by connecting to buffers
+ * @details Gives you a state, letting you start getting logs. You can get rid of the config at this point.
* @since_tizen 6.0
* @remarks An application having platform privilege level can read platform log data
* by declaring %http://tizen.org/privilege/log, which has been added since 6.5.
/**
* @brief Retrieves a single log according to a dump request
+ * @details Gets a log from the backend. See the API for dlogutil entry.
* @since_tizen 6.0
* @remarks If the calling process doesn't have CAP_SYSLOG and is not in the log group, you will only get
* some of the logs. Also, you must set the mode (dlogutil_config_mode_set_*).
/**
* @brief Irreversibly clears a log buffer from any logs inside
+ * @details Tells the backend to get rid of any stored logs. Good for chaff management.
* @since_tizen 6.0
* @remarks You can't use one of the log-getting modes (dlogutil_config_mode_set_*).
* @param[in] state A handle to the state struct
/**
* @brief Gets the human-readable, constant name of a buffer
+ * @details Gets the name of a buffer according to dlog. Mostly for convenience.
* @since_tizen 6.0
* @remarks The returned string will have the static lifetime.
* @param[in] buffer A buffer to be inspected
/**
* @brief Gets the data storage capacity of a log buffer in bytes
+ * @details Returns how many bytes of logs can fit in given buffer on the backend.
* @since_tizen 6.0
* @remarks Either CAP_SYSLOG or being in the log group is required.
* Also, you can't use one of the log-getting modes (dlogutil_config_mode_set_*).
/**
* @brief Gets the storage data usage of a log buffer, in bytes
+ * @details Returns how many bytes of logs are currently stored in given buffer on the backend.
* @since_tizen 6.0
* @remarks Either CAP_SYSLOG or being in the log group is required.
* Also, you can't use one of the log-getting modes (dlogutil_config_mode_set_*).
/**
* @brief Gets the default sorting timestamp type of a buffer.
* @since_tizen 6.0
- * @remarks This is the timestamp type that will be used for sorting by default.
+ * @details This is the timestamp type that will be used for sorting by default.
* We assume that it is always available and the input is sorted by it.
* See @ref CAPI_SYSTEM_DLOGUTIL_OVERVIEW for more details.
* @bug This is currently evaluated using the config file, which can change at runtime. In particular,
/**
* @brief Checks if a buffer contains timestamps of a given type.
* @since_tizen 6.0
- * @remarks If false is returned, the timestamp may still be available in some of the logs.
+ * @details If false is returned, the timestamp may still be available in some of the logs.
* However, if true is returned, the timestamp will always be available.
* You can check the timestamp availability per log using the dlogutil_entry_get_timestamp() function.
* @bug This is currently evaluated using the config file, which can change at runtime. In particular,
/**
* @brief Gets the buffer aliasing (same storage) information
* @since_tizen 6.0
- * @remarks Sometimes, multiple buffers will be backed by a single log storage (for example, by the same
+ * @details Sometimes, multiple buffers will be backed by a single log storage (for example, by the same
* kernel device). In such cases, the storage will only be opened once. This function allows you
* to see whether this is the case.
* @bug This is currently evaluated using the config file, which can change at runtime. In particular,