Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
80d2fa4f
Commit
80d2fa4f
authored
Dec 01, 2014
by
Eric Cano
Browse files
Changed log levels for the special case of end of tape, which is not an error.
parent
6994f150
Changes
2
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/MigrationTaskInjector.cpp
View file @
80d2fa4f
...
...
@@ -228,7 +228,7 @@ namespace daemon {
}
//end of try
catch
(
const
castor
::
tape
::
tapeserver
::
daemon
::
ErrorFlag
&
){
//we end up there because a task screw up somewhere
m_parent
.
m_lc
.
log
(
LOG_
ERR
,
"In MigrationTaskInjector::WorkerThread::run(): a task failed, "
m_parent
.
m_lc
.
log
(
LOG_
INFO
,
"In MigrationTaskInjector::WorkerThread::run(): a task failed, "
"indicating finish of run"
);
m_parent
.
signalEndDataMovement
();
...
...
castor/tape/tapeserver/daemon/TapeWriteTask.cpp
View file @
80d2fa4f
...
...
@@ -178,20 +178,24 @@ namespace daemon {
}
//log and circulate blocks
//We want to report internal error most of the time to avoid wrong
//
We want to report internal error most of the time to avoid wrong
// interpretation down the chain. Nevertheless, if the exception
// if of type Errnum AND the errorCode is ENOSPC, we will propagate it.
// This is how we communicate the fact that a tape is full to the client.
// We also change the log level to INFO for the case of end of tape.
int
errorCode
=
e
.
code
();
int
errorLevel
=
LOG_ERR
;
try
{
const
castor
::
exception
::
Errnum
&
errnum
=
dynamic_cast
<
const
castor
::
exception
::
Errnum
&>
(
e
);
if
(
ENOSPC
==
errnum
.
errorNumber
())
if
(
ENOSPC
==
errnum
.
errorNumber
())
{
errorCode
=
ENOSPC
;
errorLevel
=
LOG_INFO
;
}
}
catch
(...)
{}
LogContext
::
ScopedParam
sp
(
lc
,
Param
(
"exceptionCode"
,
errorCode
));
LogContext
::
ScopedParam
sp1
(
lc
,
Param
(
"exceptionMessage"
,
e
.
getMessageValue
()));
lc
.
log
(
LOG_ERR
,
"An error occurred for this file. End of migrations."
);
lc
.
log
(
errorLevel
,
"An error occurred for this file. End of migrations."
);
circulateMemBlocks
();
reportPacker
.
reportFailedJob
(
*
m_fileToMigrate
,
e
.
getMessageValue
(),
errorCode
);
...
...
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