Hi, Georgi.<div>These patches will be include into the main development branch?<br><br><div class="gmail_quote">2011/8/25 Вячеслав Адаманов <span dir="ltr"><<a href="mailto:adamanov@gmail.com">adamanov@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Last your proposal is flexible enough! <div><div></div><div class="h5"><br><br><div class="gmail_quote">2011/8/25 Вячеслав Адаманов <span dir="ltr"><<a href="mailto:adamanov@gmail.com" target="_blank">adamanov@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
May be set ident name based on Input param -a or -A or -D ?<br><br><div class="gmail_quote"><div>2011/8/25 Georgi Chorbadzhiyski <span dir="ltr"><<a href="mailto:gf@unixsol.org" target="_blank">gf@unixsol.org</a>></span><br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
Around 08/25/2011 04:07 PM, Georgi Chorbadzhiyski scribbled:<br>
<div>> Around 08/25/2011 03:44 PM, Вячеслав Адаманов scribbled:<br>
>> There are a couple of proposals for logging events in dvblast.<br>
>> When you run multiple copies dvblast on different DVB cards to determine<br>
>> which copies can only PID of the process, it is not convenient if using<br>
>> remote syslog.<br>
><br>
> It seems from reading the code that syslog ident is set from the executable name.<br>
> (see dvblast.c around line 812), so if you run dvblast with different names (you<br>
> may use symlinks) you'll have messages from each dvblast easily recognizable.<br>
<br>
</div>Or you may use something like the attached that allows to set syslog ident by<br>
using --logger-ident or -g command line parameters.<br>
<div><div></div><div><br>
--<br>
Georgi Chorbadzhiyski<br>
<a href="http://georgi.unixsol.org/" target="_blank">http://georgi.unixsol.org/</a><br>
</div></div><br></div></div>diff --git a/dvblast.c b/dvblast.c<br>
index 7cd6c7e..bca3b1d 100644<br>
--- a/dvblast.c<br>
+++ b/dvblast.c<br>
@@ -97,6 +97,7 @@ print_type_t i_print_type = -1;<br>
volatile sig_atomic_t b_hup_received = 0;<br>
int i_verbose = DEFAULT_VERBOSITY;<br>
int i_syslog = 0;<br>
+char *psz_syslog_ident = NULL;<br>
<br>
bool b_enable_emm = false;<br>
bool b_enable_ecm = false;<br>
@@ -461,6 +462,7 @@ void usage()<br>
msg_Raw( NULL, " -j --system-charset character set used for printing messages (default UTF-8)" );<br>
msg_Raw( NULL, " -J --dvb-charset character set used in output DVB tables (default ISO_8859-1)" );<br>
msg_Raw( NULL, " -l --logger use syslog for logging messages instead of stderr" );<br>
+ msg_Raw( NULL, " -g --logger-ident program name that will be used in syslog messages" );<br>
msg_Raw( NULL, " -x --print print interesting events on stdout in a given format" );<br>
msg_Raw( NULL, " -q --quiet be quiet (less verbosity, repeat or use number for even quieter)" );<br>
msg_Raw( NULL, " -Q --quit-timeout when locked, quit after this delay (in ms), or after the first lock timeout" );<br>
@@ -532,6 +534,7 @@ int main( int i_argc, char **pp_argv )<br>
{ "system-charset", required_argument, NULL, 'j' },<br>
{ "dvb-charset", required_argument, NULL, 'J' },<br>
{ "logger", no_argument, NULL, 'l' },<br>
+ { "logger-ident", required_argument, NULL, 'g' },<br>
{ "print", required_argument, NULL, 'x' },<br>
{ "quit-timeout", required_argument, NULL, 'Q' },<br>
{ "quiet", no_argument, NULL, 'q' },<br>
@@ -541,7 +544,7 @@ int main( int i_argc, char **pp_argv )<br>
{ 0, 0, 0, 0 }<br>
};<br>
<br>
- while ( (c = getopt_long(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:F:R:s:S:v:pb:I:m:P:K:G:H:X:O:uwUTL:E:d:D:A:lzCWYeM:N:j:J:x:Q:hVZ:", long_options, NULL)) != -1 )<br>
+ while ( (c = getopt_long(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:F:R:s:S:v:pb:I:m:P:K:G:H:X:O:uwUTL:E:d:D:A:lg:zCWYeM:N:j:J:x:Q:hVZ:", long_options, NULL)) != -1 )<br>
{<br>
switch ( c )<br>
{<br>
@@ -777,6 +780,10 @@ int main( int i_argc, char **pp_argv )<br>
b_enable_syslog = 1;<br>
break;<br>
<br>
+ case 'g':<br>
+ psz_syslog_ident = optarg;<br>
+ break;<br>
+<br>
case 'x':<br>
if ( !strcmp(optarg, "text") )<br>
i_print_type = PRINT_TEXT;<br>
@@ -809,7 +816,7 @@ int main( int i_argc, char **pp_argv )<br>
usage();<br>
<br>
if ( b_enable_syslog )<br>
- msg_Connect( pp_argv[0] );<br>
+ msg_Connect( psz_syslog_ident ? psz_syslog_ident : pp_argv[0] );<br>
<br>
if ( i_verbose )<br>
DisplayVersion();<br>
<br></blockquote></div><div><div></div><div><br><br clear="all"><div><br></div>-- <br>__________________________<br>Vyacheslav Adamanov<br>87500, Ukraine, Mariupol,<br>st. Apatova 136а<br>mob: <a href="tel:%2B38%20%28067%29%20621%2032%2061" value="+380676213261" target="_blank">+38 (067) 621 32 61</a><br>
email: <a href="mailto:adamanov@gmail.com" target="_blank">adamanov@gmail.com</a><br>
www: <a href="http://hl.ua" target="_blank">http://hl.ua</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>__________________________<br>Vyacheslav Adamanov<br>87500, Ukraine, Mariupol,<br>st. Apatova 136а<br>mob: <a href="tel:%2B38%20%28067%29%20621%2032%2061" value="+380676213261" target="_blank">+38 (067) 621 32 61</a><br>
email: <a href="mailto:adamanov@gmail.com" target="_blank">adamanov@gmail.com</a><br>
www: <a href="http://hl.ua" target="_blank">http://hl.ua</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>__________________________<br>Vyacheslav Adamanov<br>87500, Ukraine, Mariupol,<br>st. Apatova 136а<br>mob: +38 (067) 621 32 61<br>email: <a href="mailto:adamanov@gmail.com" target="_blank">adamanov@gmail.com</a><br>
www: <a href="http://hl.ua" target="_blank">http://hl.ua</a><br>
</div>