|
Lines 131-240
EOF
Link Here
|
| 131 |
fi |
131 |
fi |
| 132 |
fi |
132 |
fi |
| 133 |
|
133 |
|
| 134 |
log4perl_component() |
|
|
| 135 |
{ |
| 136 |
local config=$1 |
| 137 |
local component=$2 |
| 138 |
|
| 139 |
if grep -q "log4perl.logger.$component" $config; then |
| 140 |
return 0 |
| 141 |
else |
| 142 |
return 1 |
| 143 |
fi |
| 144 |
} |
| 145 |
|
| 146 |
# Take care of the instance's log4perl.conf file |
134 |
# Take care of the instance's log4perl.conf file |
| 147 |
for site in $(koha-list); do |
135 |
for site in $(koha-list); do |
| 148 |
log4perl_config="/etc/koha/sites/$site/log4perl.conf" |
136 |
koha-log4perl $site |
| 149 |
if ! log4perl_component $log4perl_config "z3950"; then |
|
|
| 150 |
cat <<EOF >> $log4perl_config |
| 151 |
log4perl.logger.z3950 = WARN, Z3950 |
| 152 |
log4perl.appender.Z3950=Log::Log4perl::Appender::File |
| 153 |
log4perl.appender.Z3950.filename=/var/log/koha/$site/z3950-error.log |
| 154 |
log4perl.appender.Z3950.mode=append |
| 155 |
log4perl.appender.Z3950.layout=PatternLayout |
| 156 |
log4perl.appender.Z3950.layout.ConversionPattern=[%d] [%p] %m %l%n |
| 157 |
log4perl.appender.Z3950.utf8=1 |
| 158 |
|
| 159 |
EOF |
| 160 |
fi |
| 161 |
|
| 162 |
if ! log4perl_component $log4perl_config "api"; then |
| 163 |
cat <<EOF >> $log4perl_config |
| 164 |
log4perl.logger.api = WARN, API |
| 165 |
log4perl.appender.API=Log::Log4perl::Appender::File |
| 166 |
log4perl.appender.API.filename=/var/log/koha/$site/api-error.log |
| 167 |
log4perl.appender.API.mode=append |
| 168 |
log4perl.appender.API.layout=PatternLayout |
| 169 |
log4perl.appender.API.layout.ConversionPattern=[%d] [%p] %m %l%n |
| 170 |
log4perl.appender.API.utf8=1 |
| 171 |
|
| 172 |
EOF |
| 173 |
fi |
| 174 |
done |
| 175 |
|
| 176 |
for site in $(koha-list); do |
| 177 |
log4perl_config="/etc/koha/sites/$site/log4perl.conf" |
| 178 |
if ! log4perl_component $log4perl_config "sip"; then |
| 179 |
cat <<EOF >> $log4perl_config |
| 180 |
log4perl.logger.sip = DEBUG, SIP |
| 181 |
log4perl.appender.SIP=Log::Log4perl::Appender::File |
| 182 |
log4perl.appender.SIP.filename=/var/log/koha/$site/sip.log |
| 183 |
log4perl.appender.SIP.mode=append |
| 184 |
log4perl.appender.SIP.layout=PatternLayout |
| 185 |
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %X{accountid}@%X{peeraddr}: %m %l%n |
| 186 |
log4perl.appender.SIP.utf8=1 |
| 187 |
|
| 188 |
EOF |
| 189 |
fi |
| 190 |
done |
| 191 |
|
| 192 |
for site in $(koha-list); do |
| 193 |
log4perl_config="/etc/koha/sites/$site/log4perl.conf" |
| 194 |
if ! log4perl_component $log4perl_config "plack-opac"; then |
| 195 |
cat <<EOF >> $log4perl_config |
| 196 |
log4perl.logger.plack-opac = WARN, PLACKOPAC |
| 197 |
log4perl.appender.PLACKOPAC=Log::Log4perl::Appender::File |
| 198 |
log4perl.appender.PLACKOPAC.filename=/var/log/koha/$site/plack-opac-error.log |
| 199 |
log4perl.appender.PLACKOPAC.mode=append |
| 200 |
log4perl.appender.PLACKOPAC.layout=PatternLayout |
| 201 |
log4perl.appender.PLACKOPAC.layout.ConversionPattern=[%d] [%p] %m%n |
| 202 |
log4perl.appender.PLACKOPAC.utf8=1 |
| 203 |
|
| 204 |
EOF |
| 205 |
fi |
| 206 |
done |
| 207 |
|
| 208 |
for site in $(koha-list); do |
| 209 |
log4perl_config="/etc/koha/sites/$site/log4perl.conf" |
| 210 |
if ! log4perl_component $log4perl_config "plack-api"; then |
| 211 |
cat <<EOF >> $log4perl_config |
| 212 |
log4perl.logger.plack-api = WARN, PLACKAPI |
| 213 |
log4perl.appender.PLACKAPI=Log::Log4perl::Appender::File |
| 214 |
log4perl.appender.PLACKAPI.filename=/var/log/koha/$site/plack-api-error.log |
| 215 |
log4perl.appender.PLACKAPI.mode=append |
| 216 |
log4perl.appender.PLACKAPI.layout=PatternLayout |
| 217 |
log4perl.appender.PLACKAPI.layout.ConversionPattern=[%d] [%p] %m%n |
| 218 |
log4perl.appender.PLACKAPI.utf8=1 |
| 219 |
|
| 220 |
EOF |
| 221 |
fi |
| 222 |
done |
| 223 |
|
| 224 |
for site in $(koha-list); do |
| 225 |
log4perl_config="/etc/koha/sites/$site/log4perl.conf" |
| 226 |
if ! log4perl_component $log4perl_config "plack-intranet"; then |
| 227 |
cat <<EOF >> $log4perl_config |
| 228 |
log4perl.logger.plack-intranet = WARN, PLACKINTRANET |
| 229 |
log4perl.appender.PLACKINTRANET=Log::Log4perl::Appender::File |
| 230 |
log4perl.appender.PLACKINTRANET.filename=/var/log/koha/$site/plack-intranet-error.log |
| 231 |
log4perl.appender.PLACKINTRANET.mode=append |
| 232 |
log4perl.appender.PLACKINTRANET.layout=PatternLayout |
| 233 |
log4perl.appender.PLACKINTRANET.layout.ConversionPattern=[%d] [%p] %m%n |
| 234 |
log4perl.appender.PLACKINTRANET.utf8=1 |
| 235 |
|
| 236 |
EOF |
| 237 |
fi |
| 238 |
done |
137 |
done |
| 239 |
|
138 |
|
| 240 |
for site in $(koha-list); do |
139 |
for site in $(koha-list); do |
| 241 |
- |
|
|