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
d48609c2
Commit
d48609c2
authored
10 years ago
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
Portability fix: work with BSD as well as Linux log device.
parent
647cbea9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NEWS
+1
-0
1 addition, 0 deletions
NEWS
irkerd
+8
-1
8 additions, 1 deletion
irkerd
with
9 additions
and
1 deletion
NEWS
+
1
−
0
View file @
d48609c2
irker history
Repository head:
With -i, message string argument now optional, stdin is read if it is absent.
Auto-adapt to BSD & OS X log device as well as Linux's.
2.10: 2014-06-19
irk no longer fails on ircs channel URLs.
...
...
This diff is collapsed.
Click to expand it.
irkerd
+
8
−
1
View file @
d48609c2
...
...
@@ -47,6 +47,7 @@ import logging
import
logging.handlers
import
json
import
os
import
os.path
try
:
# Python 3
import
queue
except
ImportError
:
# Python 2
...
...
@@ -980,7 +981,13 @@ if __name__ == '__main__':
args
=
parser
.
parse_args
()
if
not
args
.
log_file
and
in_background
():
handler
=
logging
.
handlers
.
SysLogHandler
(
address
=
'
/dev/log
'
,
# The Linux and BSD values of the logging device
logdev
=
[
x
for
x
in
(
'
/dev/log
'
,
'
/var/run/syslog
'
)
if
os
.
path
.
exists
(
x
)]
if
len
(
logdev
)
!=
1
:
sys
.
stderr
.
write
(
"
can
'
t initialize log device, bailing out!
\n
"
)
raise
SystemExit
(
1
)
handler
=
logging
.
handlers
.
SysLogHandler
(
address
=
logdev
[
0
],
facility
=
'
daemon
'
)
else
:
handler
=
logging
.
StreamHandler
()
...
...
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