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
f79469b3
Commit
f79469b3
authored
Jul 28, 2015
by
Peter van 't Hof
Browse files
1 level nested output_dir now allowed for log file
parent
aeb0739f
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala
View file @
f79469b3
...
...
@@ -64,13 +64,19 @@ trait PipelineCommand extends MainCommand with GatkLogging {
}
for
(
t
<-
0
until
argsSize
)
{
if
(
args
(
t
)
==
"--outputDir"
||
args
(
t
)
==
"-outDir"
)
{
throw
new
IllegalArgumentException
(
"Commandline argument is deprecated, should use config for this now"
)
throw
new
IllegalArgumentException
(
"Commandline argument is deprecated, should use config for this now
or use: -cv output_dir=<Path to output dir>
"
)
}
}
val
logDir
:
File
=
new
File
(
Config
.
global
.
map
.
getOrElse
(
"output_dir"
,
"./"
).
toString
+
File
.
separator
+
".log"
)
logDir
.
mkdirs
()
val
logFile
=
new
File
(
logDir
,
"biopet."
+
BiopetQCommandLine
.
timestamp
+
".log"
)
val
logFile
=
{
val
pipelineName
=
this
.
getClass
.
getSimpleName
.
toLowerCase
.
split
(
"""\$"""
).
head
val
pipelineConfig
=
Config
.
global
.
map
.
getOrElse
(
pipelineName
,
Map
()).
asInstanceOf
[
Map
[
String
,
Any
]]
val
pipelineOutputDir
=
new
File
(
Config
.
global
.
map
.
getOrElse
(
"output_dir"
,
pipelineConfig
.
getOrElse
(
"output_dir"
,
"./"
)).
toString
)
val
logDir
:
File
=
new
File
(
pipelineOutputDir
,
".log"
)
logDir
.
mkdirs
()
new
File
(
logDir
,
"biopet."
+
BiopetQCommandLine
.
timestamp
+
".log"
)
}
val
a
=
new
WriterAppender
(
new
PatternLayout
(
"%-5p [%d] [%C{1}] - %m%n"
),
new
PrintWriter
(
logFile
))
logger
.
addAppender
(
a
)
...
...
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