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
Mirrors
biopet.biopet
Commits
def40758
Commit
def40758
authored
Dec 06, 2016
by
Peter van 't Hof
Browse files
Move log files
parent
bb57b055
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
def40758
...
...
@@ -171,4 +171,6 @@ object BiopetQScript {
require
(
outputDir
.
getAbsoluteFile
.
canRead
,
s
"No premision to read outputdir: $outputDir"
)
require
(
outputDir
.
getAbsoluteFile
.
canWrite
,
s
"No premision to write outputdir: $outputDir"
)
}
}
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala
View file @
def40758
...
...
@@ -73,15 +73,14 @@ trait PipelineCommand extends MainCommand with GatkLogging with ImplicitConversi
}
}
val
logFile
=
{
val
pipelineName
=
this
.
getClass
.
getSimpleName
.
toLowerCase
.
split
(
"""\$"""
).
head
val
pipelineConfig
=
globalConfig
.
map
.
getOrElse
(
pipelineName
,
Map
()).
asInstanceOf
[
Map
[
String
,
Any
]]
val
pipelineOutputDir
=
new
File
(
globalConfig
.
map
.
getOrElse
(
"output_dir"
,
pipelineConfig
.
getOrElse
(
"output_dir"
,
"./"
)).
toString
)
BiopetQScript
.
checkOutputDir
(
pipelineOutputDir
)
val
logDir
:
File
=
new
File
(
pipelineOutputDir
,
".log"
)
logDir
.
mkdirs
()
new
File
(
logDir
,
"biopet."
+
BiopetQCommandLine
.
timestamp
+
".log"
)
}
val
pipelineName
=
this
.
getClass
.
getSimpleName
.
toLowerCase
.
split
(
"""\$"""
).
head
val
pipelineConfig
=
globalConfig
.
map
.
getOrElse
(
pipelineName
,
Map
()).
asInstanceOf
[
Map
[
String
,
Any
]]
val
pipelineOutputDir
=
new
File
(
globalConfig
.
map
.
getOrElse
(
"output_dir"
,
pipelineConfig
.
getOrElse
(
"output_dir"
,
"./"
)).
toString
)
BiopetQScript
.
checkOutputDir
(
pipelineOutputDir
)
val
logDir
:
File
=
new
File
(
pipelineOutputDir
,
".log"
+
File
.
separator
+
BiopetQCommandLine
.
timestamp
)
logDir
.
mkdirs
()
val
logFile
=
new
File
(
logDir
,
"biopet.log"
)
val
a
=
new
WriterAppender
(
new
PatternLayout
(
"%-5p [%d] [%C{1}] - %m%n"
),
new
PrintWriter
(
logFile
))
Logging
.
logger
.
addAppender
(
a
)
...
...
@@ -90,7 +89,7 @@ trait PipelineCommand extends MainCommand with GatkLogging with ImplicitConversi
argv
++=
Array
(
"-S"
,
pipeline
)
argv
++=
args
if
(!
args
.
contains
(
"--log_to_file"
)
&&
!
args
.
contains
(
"-log"
))
{
argv
++=
List
(
"--log_to_file"
,
new
File
(
log
File
.
getParentFile
,
"queue."
+
BiopetQCommandLine
.
timestamp
+
"
.log"
).
getAbsolutePath
)
argv
++=
List
(
"--log_to_file"
,
new
File
(
log
Dir
,
"queue
.log"
).
getAbsolutePath
)
}
if
(!
args
.
contains
(
"-retry"
)
&&
!
args
.
contains
(
"--retry_failed"
))
{
val
retry
:
Int
=
globalConfig
(
pipelineName
,
Nil
,
"retry"
,
default
=
5
)
...
...
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