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
S
SWITCHwayf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guillaume Rousse
SWITCHwayf
Commits
530fb7d3
Commit
530fb7d3
authored
Jun 26, 2018
by
Guillaume Rousse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename syslog-prefix to more explicit syslog-id
parent
3a0f9e11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
bin/update-metadata.php
bin/update-metadata.php
+7
-7
No files found.
bin/update-metadata.php
View file @
530fb7d3
...
...
@@ -33,7 +33,7 @@ Argument Description
--min-sp-count <count> Minimum expected number of SPs in metadata
--language <locale> Language locale, e.g. 'en', 'jp', ...
--syslog Use syslog for reporting
--syslog-
prefix <prefix> Prefix
for syslog messages
--syslog-
id <id> Process identity
for syslog messages
--verbose | -v Verbose mode
--help | -h Print this man page
...
...
@@ -56,7 +56,7 @@ $longopts = array(
"language:"
,
"verbose"
,
"syslog"
,
"syslog-
prefix
:"
,
"syslog-
id
:"
,
"help"
,
);
...
...
@@ -70,7 +70,7 @@ if (isset($options['help']) || isset($options['h'])) {
$language
=
isset
(
$options
[
'language'
])
?
$options
[
'language'
]
:
'en'
;
$verbose
=
isset
(
$options
[
'verbose'
])
||
isset
(
$options
[
'v'
])
?
true
:
false
;
$syslog
=
isset
(
$options
[
'syslog'
])
?
true
:
false
;
$
prefix
=
isset
(
$options
[
'syslog-prefix'
])
?
$options
[
'syslog-prefix
'
]
:
'switchwayf'
;
$
syslogId
=
isset
(
$options
[
'syslog-id'
])
?
$options
[
'syslog-id
'
]
:
'switchwayf'
;
if
(
isset
(
$options
[
'metadata-url'
]))
{
$metadataURL
=
$options
[
'metadata-url'
];
...
...
@@ -224,10 +224,10 @@ if ($metadataURL) {
}
function
reportError
(
$message
)
{
global
$syslog
,
$
prefix
;
global
$syslog
,
$
syslogId
;
if
(
$syslog
)
{
openlog
(
$
prefix
,
LOG_NDELAY
,
LOG_USER
);
openlog
(
$
syslogId
,
LOG_NDELAY
,
LOG_USER
);
syslog
(
LOG_ERR
,
$message
);
}
else
{
fwrite
(
STDERR
,
$message
);
...
...
@@ -235,10 +235,10 @@ function reportError($message) {
}
function
reportInfo
(
$message
)
{
global
$syslog
,
$
prefix
;
global
$syslog
,
$
syslogId
;
if
(
$syslog
)
{
openlog
(
$
prefix
,
LOG_NDELAY
,
LOG_USER
);
openlog
(
$
syslogId
,
LOG_NDELAY
,
LOG_USER
);
syslog
(
LOG_INFO
,
$message
);
}
else
{
fwrite
(
STDOUT
,
$message
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment