Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Compare Revisions
d8c099dbc962727df27236505d5ea5c8cb36ac9e...6977a080e9258f6e663f7bb5cfe4721899fd4a58
Commits (1)
Support an optional log identifier to syslog()
· 6977a080
Rob Swindell
authored
Jan 30, 2022
Nelgin: "anyway to get sexpots to report itself differently to syslog" [?]
6977a080
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/sexpots/sexpots.c
src/sexpots/sexpots.c
+6
-2
No files found.
src/sexpots/sexpots.c
View file @
6977a080
...
...
@@ -139,7 +139,7 @@ int usage(const char* fname)
"
\n
-enable enable NT service (auto-start during boot)"
"
\n
-disable disable NT service"
#else
"
\n
-syslog
log to syslog rather than stdout/err"
"
\n
-syslog
[=ident]
log to syslog rather than stdout/err"
#endif
"
\n
"
,
getfname
(
fname
)
...
...
@@ -1509,7 +1509,7 @@ service_loop(int argc, char** argv)
}
else
if
(
stricmp
(
arg
,
"help"
)
==
0
||
*
arg
==
'?'
)
exit
(
usage
(
argv
[
0
]));
else
if
(
stricmp
(
arg
,
"syslog"
)
!=
0
)
{
else
if
(
stricmp
(
arg
,
"syslog"
)
!=
0
&&
strnicmp
(
arg
,
"syslog="
,
7
)
!=
0
)
{
fprintf
(
stderr
,
"Invalid option: %s
\n
"
,
arg
);
exit
(
usage
(
argv
[
0
]));
}
...
...
@@ -1688,6 +1688,10 @@ int main(int argc, char** argv)
#else
else
if
(
stricmp
(
arg
,
"syslog"
)
==
0
)
daemonize
=
TRUE
;
else
if
(
strnicmp
(
arg
,
"syslog="
,
7
)
==
0
)
{
daemonize
=
TRUE
;
openlog
(
arg
+
7
,
LOG_CONS
,
LOG_USER
);
}
#endif
}
...
...