Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
irker
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iDB
irker
Commits
672240ab
Commit
672240ab
authored
10 years ago
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
Use syslog facility when irkerd is backgtrounded and no -l was given.
parent
838196c5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS
+3
-0
3 additions, 0 deletions
NEWS
irkerd
+11
-1
11 additions, 1 deletion
irkerd
irkerd.xml
+7
-2
7 additions, 2 deletions
irkerd.xml
with
21 additions
and
3 deletions
NEWS
+
3
−
0
View file @
672240ab
irker history
Repository head:
If irkerd is running in background, log to /dev/syslog (facility daemon).
2.8: 2014-05-30
Various minor improvements to irk.
Cope better with branch names containing slashes.
...
...
This diff is collapsed.
Click to expand it.
irkerd
+
11
−
1
View file @
672240ab
...
...
@@ -42,8 +42,10 @@ CONNECTION_MAX = 200 # To avoid hitting a thread limit
version
=
"
2.8
"
import
os
import
argparse
import
logging
import
logging.handlers
import
json
try
:
# Python 3
import
queue
...
...
@@ -933,6 +935,9 @@ class IrkerUDPHandler(socketserver.BaseRequestHandler):
line
=
UNICODE_TYPE
(
line
,
'
utf-8
'
)
irker
.
handle
(
line
=
line
.
strip
())
def
in_background
():
"
Is this process running in background?
"
return
os
.
getpgrp
()
!=
os
.
tcgetpgrp
(
1
)
if
__name__
==
'
__main__
'
:
parser
=
argparse
.
ArgumentParser
(
...
...
@@ -965,7 +970,12 @@ if __name__ == '__main__':
help
=
'
message for --immediate mode
'
)
args
=
parser
.
parse_args
()
handler
=
logging
.
StreamHandler
()
if
not
args
.
log_file
and
in_background
():
handler
=
logging
.
handlers
.
SysLogHandler
(
address
=
'
/dev/log
'
,
facility
=
'
daemon
'
)
else
:
handler
=
logging
.
StreamHandler
()
LOG
.
addHandler
(
handler
)
if
args
.
log_level
:
log_level
=
getattr
(
logging
,
args
.
log_level
.
upper
())
...
...
This diff is collapsed.
Click to expand it.
irkerd.xml
+
7
−
2
View file @
672240ab
...
...
@@ -108,8 +108,9 @@ joining a channel to log its traffic.</para>
<variablelist>
<varlistentry>
<term>
-d
</term>
<listitem><para>
Takes a following value, setting the debugging level from
it. This option will generally only be of interest to developers;
<listitem><para>
Takes a following value, setting the debugging level
from it; possible values are 'critical', 'error', 'warning', 'info',
'debug'. This option will generally only be of interest to developers;
consult the source code for details.
</para></listitem>
</varlistentry>
<varlistentry>
...
...
@@ -149,6 +150,10 @@ terminate.</para></listitem>
</varlistentry>
</variablelist>
<para>
If no
<option>
-l
</option>
is set, logging will be to stndard
output (if
<application>
irkerd
</application>
is running in foreground)
or to /dev/syslog with facility "daemon" (if
<application>
irkerd
</application>
is running in packground).
</para>
</refsect1>
<refsect1
id=
'limitations'
><title>
LIMITATIONS
</title>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment