|
RocketLogger 2.1.2
|
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | RL_LOG_DEFAULT_FILE "/var/log/rocketlogger.log" |
| Default log file name. More... | |
| #define | RL_LOG_PATH_LENGTH_MAX 256 |
| Maximum log file name path length. More... | |
| #define | RL_LOG_FILE_SIZE_MAX (1000 * 1000) |
| Maximum log file size in bytes. More... | |
Typedefs | |
| typedef enum rl_log_level | rl_log_level_t |
Enumerations | |
| enum | rl_log_level { RL_LOG_IGNORE , RL_LOG_ERROR , RL_LOG_WARNING , RL_LOG_INFO , RL_LOG_VERBOSE } |
Functions | |
| int | rl_log_init (char const *const log_file, rl_log_level_t verbosity) |
| void | rl_log_verbosity (rl_log_level_t verbosity) |
| int | rl_log (rl_log_level_t log_level, char const *const format,...) |
| #define RL_LOG_DEFAULT_FILE "/var/log/rocketlogger.log" |
Default log file name.
Copyright (c) 2016-2020, ETH Zurich, Computer Engineering Group All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| #define RL_LOG_FILE_SIZE_MAX (1000 * 1000) |
| #define RL_LOG_PATH_LENGTH_MAX 256 |
| typedef enum rl_log_level rl_log_level_t |
| enum rl_log_level |
| int rl_log | ( | rl_log_level_t | log_level, |
| char const *const | format, | ||
| ... | |||
| ) |
Write a new log message.
| log_level | Log level of the message |
| format | The message format string passed to fprintf() |
| ... | Variables used to format value string |
Definition at line 82 of file log.c.
References RL_LOG_ERROR, RL_LOG_IGNORE, RL_LOG_INFO, RL_LOG_VERBOSE, and RL_LOG_WARNING.
Referenced by bme280_get_id(), bme280_init(), bme280_read(), bme280_read_calibration(), bme280_set_parameters(), button_interrupt_handler(), calibration_load(), create_time_stamp(), fs_space_free(), fs_space_total(), gpio_init(), gpio_setup(), gpio_setup_interrupt(), gpio_wait_interrupt(), hw_sample(), main(), pru_init(), pru_sample(), rl_config_read_default(), rl_config_validate(), rl_config_write_default(), rl_file_add_data_block(), rl_is_sampling(), rl_pid_set(), rl_run(), rl_socket_handle_data(), rl_socket_init(), rl_status_pub_init(), rl_status_read(), rl_status_shm_deinit(), rl_status_shm_init(), rl_status_write(), rl_stop(), sem_create(), sem_get(), sem_open(), sem_remove(), sem_set(), sem_wait(), sensors_close_bus(), sensors_open_bus(), sensors_scan(), tsl4531_get_id(), tsl4531_init(), tsl4531_read(), tsl4531_send_range(), tsl4531_set_parameters(), and tsl4531_set_range().
| int rl_log_init | ( | char const *const | log_file, |
| rl_log_level_t | verbosity | ||
| ) |
Initialize the log module.
| log_file | The filename of the file the log messages are written to |
| verbosity | Messages with a log level more severe or equal to this level are also printed to the terminal |
Definition at line 49 of file log.c.
References RL_LOG_FILE_SIZE_MAX, and rl_log_verbosity().
Referenced by main().
Here is the call graph for this function:| void rl_log_verbosity | ( | rl_log_level_t | verbosity | ) |
Change the log module's verbosity.
| verbosity | Messages with log levels more severe or equal to the verbosity level are also printed to the terminal |
Definition at line 80 of file log.c.
Referenced by rl_log_init().