mirror of https://github.com/nirenjan/libx52.git
Make thread startup and shutdown logs as INFO
parent
52232b1a14
commit
bd2dbbb9cc
|
@ -157,7 +157,7 @@ static void * x52_clock_thr(void *param)
|
|||
{
|
||||
int rc;
|
||||
|
||||
PINELOG_TRACE("Starting X52 clock thread");
|
||||
PINELOG_INFO(_("Starting X52 clock manager thread"));
|
||||
for (;;) {
|
||||
time_t cur_time;
|
||||
|
||||
|
@ -196,6 +196,6 @@ void x52d_clock_init(void)
|
|||
|
||||
void x52d_clock_exit(void)
|
||||
{
|
||||
PINELOG_TRACE("Shutting down clock thread");
|
||||
PINELOG_INFO(_("Shutting down X52 clock manager thread"));
|
||||
pthread_cancel(clock_thr);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ static void *x52_dev_acq(void *param)
|
|||
{
|
||||
int rc;
|
||||
|
||||
PINELOG_TRACE("Starting X52 device acquisition thread");
|
||||
PINELOG_INFO(_("Starting X52 device acquisition thread"));
|
||||
// Check if the device is connected in a loop
|
||||
for (;;) {
|
||||
#define RECONNECT_DELAY 5
|
||||
|
@ -79,7 +79,7 @@ static volatile bool device_update_needed;
|
|||
|
||||
static void *x52_dev_upd(void *param)
|
||||
{
|
||||
PINELOG_TRACE("Starting X52 device update thread");
|
||||
PINELOG_INFO(_("Starting X52 device update thread"));
|
||||
// Check if the device needs to be updated in a loop
|
||||
for (;;) {
|
||||
#define UPDATE_CHECK_DELAY 50000 // Wait for this many useconds
|
||||
|
@ -98,7 +98,7 @@ static void *x52_dev_upd(void *param)
|
|||
void x52d_dev_init(void)
|
||||
{
|
||||
int rc;
|
||||
PINELOG_TRACE("Initializing libx52");
|
||||
PINELOG_INFO(_("Initializing libx52"));
|
||||
rc = libx52_init(&x52_dev);
|
||||
|
||||
if (rc != LIBX52_SUCCESS) {
|
||||
|
@ -121,10 +121,10 @@ void x52d_dev_init(void)
|
|||
void x52d_dev_exit(void)
|
||||
{
|
||||
// Shutdown any threads
|
||||
PINELOG_TRACE("Shutting down device acquisition thread");
|
||||
PINELOG_INFO(_("Shutting down X52 device acquisition thread"));
|
||||
pthread_cancel(device_acq_thr);
|
||||
|
||||
PINELOG_TRACE("Shutting down device update thread");
|
||||
PINELOG_INFO(_("Shutting down X52 device update thread"));
|
||||
pthread_cancel(device_upd_thr);
|
||||
|
||||
libx52_exit(x52_dev);
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
#include "x52d_device.h"
|
||||
#include "pinelog.h"
|
||||
|
||||
static volatile bool flag_quit;
|
||||
static volatile int flag_quit;
|
||||
|
||||
static void termination_handler(int signum)
|
||||
{
|
||||
flag_quit = true;
|
||||
flag_quit = signum;
|
||||
}
|
||||
|
||||
static volatile bool flag_reload;
|
||||
|
@ -63,7 +63,7 @@ static void listen_signal(int signum, void (*handler)(int))
|
|||
|
||||
rc = sigaction(signum, &action, NULL);
|
||||
if (rc < 0) {
|
||||
PINELOG_FATAL(_("Error %d installing signal handler for signal %d: %s"),
|
||||
PINELOG_FATAL(_("Error %d installing handler for signal %d: %s"),
|
||||
errno, signum, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ int main(int argc, char **argv)
|
|||
// Apply configuration
|
||||
x52d_config_apply();
|
||||
|
||||
flag_quit = false;
|
||||
flag_quit = 0;
|
||||
while(!flag_quit) {
|
||||
// TODO: Replace with main event loop
|
||||
// Let all threads run in background forever
|
||||
|
@ -185,7 +185,7 @@ int main(int argc, char **argv)
|
|||
|
||||
/* Check if we need to reload configuration */
|
||||
if (flag_reload) {
|
||||
PINELOG_TRACE("Reinitializing configuration");
|
||||
PINELOG_INFO(_("Reloading X52 configuration"));
|
||||
x52d_config_load(conf_file);
|
||||
x52d_config_apply();
|
||||
flag_reload = false;
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: x52pro-linux 0.2.1\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\n"
|
||||
"POT-Creation-Date: 2021-07-23 09:47-0700\n"
|
||||
"POT-Creation-Date: 2021-07-26 10:20-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -370,21 +370,34 @@ msgstr ""
|
|||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:35
|
||||
#: daemon/x52d_main.c:50
|
||||
#, c-format
|
||||
msgid "Error %d setting log file: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:46
|
||||
#: daemon/x52d_main.c:66
|
||||
#, c-format
|
||||
msgid "Error %d installing handler for signal %d: %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:77
|
||||
#, c-format
|
||||
msgid "Usage: %s [-f] [-v] [-q] [-l log-file] [-o override] [-c config-file]\n"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:107
|
||||
#: daemon/x52d_main.c:138
|
||||
#, c-format
|
||||
msgid "Unable to parse configuration override '%s'\n"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:188
|
||||
msgid "Reloading X52 configuration"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_main.c:198
|
||||
msgid "Shutting down X52 daemon"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_clock.c:27
|
||||
#, c-format
|
||||
msgid "Setting clock enable to %s"
|
||||
|
@ -403,75 +416,103 @@ msgstr ""
|
|||
msgid "Unable to backup timezone environment. Falling back to UTC"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_clock.c:132
|
||||
#: daemon/x52d_clock.c:160
|
||||
msgid "Starting X52 clock manager thread"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_clock.c:171
|
||||
#, c-format
|
||||
msgid "Error %d retrieving current time: %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_clock.c:153
|
||||
#: daemon/x52d_clock.c:192
|
||||
#, c-format
|
||||
msgid "Error %d initializing clock thread: %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_clock.c:199
|
||||
msgid "Shutting down X52 clock manager thread"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_config.c:26
|
||||
#, c-format
|
||||
msgid "Error %d setting configuration defaults: %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_config_parser.c:130
|
||||
#: daemon/x52d_config_parser.c:164
|
||||
#, c-format
|
||||
msgid "Ignoring unknown key '%s.%s'"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_config_parser.c:171
|
||||
#: daemon/x52d_config_parser.c:205
|
||||
#, c-format
|
||||
msgid "Failed processing configuration file %s - code %d"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_config_parser.c:201
|
||||
#: daemon/x52d_config_parser.c:235
|
||||
msgid "Failed to allocate memory for override structure"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_config_parser.c:210
|
||||
#: daemon/x52d_config_parser.c:244
|
||||
msgid "Failed to allocate memory for override string"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_config_parser.c:221
|
||||
#: daemon/x52d_config_parser.c:255
|
||||
#, c-format
|
||||
msgid "No section found in override string '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_config_parser.c:235
|
||||
#: daemon/x52d_config_parser.c:269
|
||||
#, c-format
|
||||
msgid "No key found in override string '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_config_parser.c:246
|
||||
#: daemon/x52d_config_parser.c:280
|
||||
#, c-format
|
||||
msgid "No value found in override string '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_config_parser.c:297
|
||||
#: daemon/x52d_config_parser.c:331
|
||||
#, c-format
|
||||
msgid "Error processing override '%s.%s=%s'"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_device.c:49
|
||||
#: daemon/x52d_device.c:35
|
||||
msgid "Starting X52 device acquisition thread"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_device.c:50
|
||||
#, c-format
|
||||
msgid "Error %d connecting to device: %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_device.c:102
|
||||
#: daemon/x52d_device.c:82
|
||||
msgid "Starting X52 device update thread"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_device.c:101
|
||||
msgid "Initializing libx52"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_device.c:105
|
||||
#, c-format
|
||||
msgid "Failure %d initializing libx52: %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_device.c:136
|
||||
#: daemon/x52d_device.c:124
|
||||
msgid "Shutting down X52 device acquisition thread"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_device.c:127
|
||||
msgid "Shutting down X52 device update thread"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_device.c:140
|
||||
#, c-format
|
||||
msgid "Error %d when updating X52 parameter: %s"
|
||||
msgstr ""
|
||||
|
||||
#: daemon/x52d_device.c:205
|
||||
#: daemon/x52d_device.c:220
|
||||
#, c-format
|
||||
msgid "Error %d when updating X52 device: %s"
|
||||
msgstr ""
|
||||
|
|
81
po/xx_PL.po
81
po/xx_PL.po
|
@ -7,8 +7,8 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: x52pro-linux 0.2.1\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\n"
|
||||
"POT-Creation-Date: 2021-07-23 09:47-0700\n"
|
||||
"PO-Revision-Date: 2021-07-23 09:51-0700\n"
|
||||
"POT-Creation-Date: 2021-07-26 10:20-0700\n"
|
||||
"PO-Revision-Date: 2021-07-26 10:27-0700\n"
|
||||
"Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n"
|
||||
"Language-Team: Dummy Language for testing i18n\n"
|
||||
"Language: xx_PL\n"
|
||||
|
@ -47,7 +47,7 @@ msgstr "Inputay arameterpay outay ofay angeray"
|
|||
|
||||
#: lib/libx52/x52_strerror.c:46
|
||||
msgid "USB transaction failure"
|
||||
msgstr "USBay ransactiontay ailurefay"
|
||||
msgstr "USBay ansactiontray ailurefay"
|
||||
|
||||
#: lib/libx52/x52_strerror.c:49
|
||||
msgid "USB input/output error"
|
||||
|
@ -413,23 +413,36 @@ msgstr "Estingtay aracterchay 0x%02x..."
|
|||
msgid "OK"
|
||||
msgstr "OKay"
|
||||
|
||||
#: daemon/x52d_main.c:35
|
||||
#: daemon/x52d_main.c:50
|
||||
#, c-format
|
||||
msgid "Error %d setting log file: %s\n"
|
||||
msgstr "Erroray %d ettingsay oglay ilefay: %s\n"
|
||||
|
||||
#: daemon/x52d_main.c:46
|
||||
#: daemon/x52d_main.c:66
|
||||
#, c-format
|
||||
msgid "Error %d installing handler for signal %d: %s"
|
||||
msgstr "Erroray %d installingay andlerhay orfay ignalsay %d: %s"
|
||||
|
||||
#: daemon/x52d_main.c:77
|
||||
#, c-format
|
||||
msgid "Usage: %s [-f] [-v] [-q] [-l log-file] [-o override] [-c config-file]\n"
|
||||
msgstr ""
|
||||
"Usageay: %s [-f] [-v] [-q] [-l oglay-ilefay] [-o overrideay] [-c onfigcay-"
|
||||
"ilefay]\n"
|
||||
|
||||
#: daemon/x52d_main.c:107
|
||||
#: daemon/x52d_main.c:138
|
||||
#, c-format
|
||||
msgid "Unable to parse configuration override '%s'\n"
|
||||
msgstr "Unableay otay arsepay onfigurationcay overrideay '%s'\n"
|
||||
|
||||
#: daemon/x52d_main.c:188
|
||||
msgid "Reloading X52 configuration"
|
||||
msgstr "Eloadingray X52 onfigurationcay"
|
||||
|
||||
#: daemon/x52d_main.c:198
|
||||
msgid "Shutting down X52 daemon"
|
||||
msgstr "Uttingshay ownday X52 aemonday"
|
||||
|
||||
#: daemon/x52d_clock.c:27
|
||||
#, c-format
|
||||
msgid "Setting clock enable to %s"
|
||||
|
@ -451,75 +464,103 @@ msgid "Unable to backup timezone environment. Falling back to UTC"
|
|||
msgstr ""
|
||||
"Unableay otay ackupbay imezonetay environmentay. Allingfay ackbay otay UTCay"
|
||||
|
||||
#: daemon/x52d_clock.c:132
|
||||
#: daemon/x52d_clock.c:160
|
||||
msgid "Starting X52 clock manager thread"
|
||||
msgstr "Artingstay X52 ockclay anagermay eadthray"
|
||||
|
||||
#: daemon/x52d_clock.c:171
|
||||
#, c-format
|
||||
msgid "Error %d retrieving current time: %s"
|
||||
msgstr "Erroray %d etrievingray urrentcay imetay: %s"
|
||||
|
||||
#: daemon/x52d_clock.c:153
|
||||
#: daemon/x52d_clock.c:192
|
||||
#, c-format
|
||||
msgid "Error %d initializing clock thread: %s"
|
||||
msgstr "Erroray %d initializingay ockclay eadthray: %s"
|
||||
|
||||
#: daemon/x52d_clock.c:199
|
||||
msgid "Shutting down X52 clock manager thread"
|
||||
msgstr "Uttingshay ownday X52 ockclay anagermay eadthray"
|
||||
|
||||
#: daemon/x52d_config.c:26
|
||||
#, c-format
|
||||
msgid "Error %d setting configuration defaults: %s"
|
||||
msgstr "Erroray %d ettingsay onfigurationcay efaultsday: %s"
|
||||
|
||||
#: daemon/x52d_config_parser.c:130
|
||||
#: daemon/x52d_config_parser.c:164
|
||||
#, c-format
|
||||
msgid "Ignoring unknown key '%s.%s'"
|
||||
msgstr "Ignoringay unknownay eykay '%s.%s'"
|
||||
|
||||
#: daemon/x52d_config_parser.c:171
|
||||
#: daemon/x52d_config_parser.c:205
|
||||
#, c-format
|
||||
msgid "Failed processing configuration file %s - code %d"
|
||||
msgstr "Ailedfay ocessingpray onfigurationcay ilefay %s - odecay %d"
|
||||
|
||||
#: daemon/x52d_config_parser.c:201
|
||||
#: daemon/x52d_config_parser.c:235
|
||||
msgid "Failed to allocate memory for override structure"
|
||||
msgstr "Ailedfay otay allocateay emorymay orfay overrideay ucturestray"
|
||||
|
||||
#: daemon/x52d_config_parser.c:210
|
||||
#: daemon/x52d_config_parser.c:244
|
||||
msgid "Failed to allocate memory for override string"
|
||||
msgstr "Ailedfay otay allocateay emorymay orfay overrideay ingstray"
|
||||
|
||||
#: daemon/x52d_config_parser.c:221
|
||||
#: daemon/x52d_config_parser.c:255
|
||||
#, c-format
|
||||
msgid "No section found in override string '%s'"
|
||||
msgstr "Onay ectionsay oundfay inay overrideay ingstray '%s'"
|
||||
|
||||
#: daemon/x52d_config_parser.c:235
|
||||
#: daemon/x52d_config_parser.c:269
|
||||
#, c-format
|
||||
msgid "No key found in override string '%s'"
|
||||
msgstr "Onay eykay oundfay inay overrideay ingstray '%s'"
|
||||
|
||||
#: daemon/x52d_config_parser.c:246
|
||||
#: daemon/x52d_config_parser.c:280
|
||||
#, c-format
|
||||
msgid "No value found in override string '%s'"
|
||||
msgstr "Onay aluevay oundfay inay overrideay ingstray '%s'"
|
||||
|
||||
#: daemon/x52d_config_parser.c:297
|
||||
#: daemon/x52d_config_parser.c:331
|
||||
#, c-format
|
||||
msgid "Error processing override '%s.%s=%s'"
|
||||
msgstr "Erroray ocessingpray overriday '%s.%s=%s'"
|
||||
|
||||
#: daemon/x52d_device.c:49
|
||||
#: daemon/x52d_device.c:35
|
||||
msgid "Starting X52 device acquisition thread"
|
||||
msgstr "Artingstay X52 eviceday acquisitionay eadthray"
|
||||
|
||||
#: daemon/x52d_device.c:50
|
||||
#, c-format
|
||||
msgid "Error %d connecting to device: %s"
|
||||
msgstr "Erroray %d onnectingcay otay eviceday: %s"
|
||||
|
||||
#: daemon/x52d_device.c:102
|
||||
#: daemon/x52d_device.c:82
|
||||
msgid "Starting X52 device update thread"
|
||||
msgstr "Artingstay X52 eviceday updateay eadthray"
|
||||
|
||||
#: daemon/x52d_device.c:101
|
||||
msgid "Initializing libx52"
|
||||
msgstr "Initializingay libx52"
|
||||
|
||||
#: daemon/x52d_device.c:105
|
||||
#, c-format
|
||||
msgid "Failure %d initializing libx52: %s"
|
||||
msgstr "Ailurefay %d initializeay libx52: %s"
|
||||
|
||||
#: daemon/x52d_device.c:136
|
||||
#: daemon/x52d_device.c:124
|
||||
msgid "Shutting down X52 device acquisition thread"
|
||||
msgstr "Uttingshay ownday X52 eviceday acquisitionay eadthray"
|
||||
|
||||
#: daemon/x52d_device.c:127
|
||||
msgid "Shutting down X52 device update thread"
|
||||
msgstr "Uttingshay ownday X52 eviceday updateay eadthray"
|
||||
|
||||
#: daemon/x52d_device.c:140
|
||||
#, c-format
|
||||
msgid "Error %d when updating X52 parameter: %s"
|
||||
msgstr "Erroray %d enwhay updatingay X52 arameterpay: %s"
|
||||
|
||||
#: daemon/x52d_device.c:205
|
||||
#: daemon/x52d_device.c:220
|
||||
#, c-format
|
||||
msgid "Error %d when updating X52 device: %s"
|
||||
msgstr "Erroray %d enwhay updatingay X52 eviceday: %s"
|
||||
|
|
Loading…
Reference in New Issue