Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
🚀
This server has been upgraded to GitLab release
15.7
.
🚀
Open sidebar
GIP RENATER
switch-wayf
Commits
dba815c4
Commit
dba815c4
authored
Mar 27, 2015
by
haemmer
Browse files
Connection to system logger now is opened only when it is needed
parent
390ae84c
Changes
3
Hide whitespace changes
Inline
Side-by-side
WAYF
View file @
dba815c4
...
...
@@ -9,9 +9,6 @@ Web site: https://www.switch.ch/aai/support/tools/wayf/
******************************************************************************
*/
// Init connection to system logger
openlog
(
"SWITCHwayf"
,
LOG_ODELAY
,
LOG_USER
);
/*------------------------------------------------*/
// Load general configuration and template file
/*------------------------------------------------*/
...
...
functions.php
View file @
dba815c4
...
...
@@ -755,10 +755,19 @@ function logAccessEntry($protocol, $type, $sp, $idp, $return){
}
/******************************************************************************/
// Init connection to system logger
function
initLogger
(){
openlog
(
"SWITCHwayf"
,
LOG_NDELAY
,
LOG_USER
);
}
/******************************************************************************/
// Logs an info message
function
logInfo
(
$infoMsg
){
global
$developmentMode
;
initLogger
();
syslog
(
LOG_INFO
,
$infoMsg
);
if
(
$developmentMode
&&
isRun
){
...
...
@@ -771,6 +780,8 @@ function logInfo($infoMsg){
function
logWarning
(
$warnMsg
){
global
$developmentMode
;
initLogger
();
syslog
(
LOG_WARNING
,
$warnMsg
);
if
(
$developmentMode
&&
isRunViaCLI
()){
...
...
@@ -783,6 +794,8 @@ function logWarning($warnMsg){
function
logError
(
$errorMsg
){
global
$developmentMode
;
initLogger
();
syslog
(
LOG_ERR
,
$errorMsg
);
if
(
$developmentMode
){
...
...
readMetadata.php
View file @
dba815c4
...
...
@@ -21,9 +21,6 @@ require_once('config.php');
if
(
isRunViaCLI
()){
// Run in cli mode.
// Init log file
openlog
(
"SWITCHwayf.readMetadata.php"
,
LOG_ODELAY
,
LOG_USER
);
// Set default config options
initConfigOptions
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment