Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computing
cbmroot
Commits
96fb0d24
Commit
96fb0d24
authored
1 year ago
by
Felix Weiglhofer
Browse files
Options
Downloads
Patches
Plain Diff
cbmreco: Add flag to write logs to file.
parent
0b8868bd
No related branches found
No related tags found
1 merge request
!1181
cbmreco: Add flag to write logs to file.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
algo/base/Options.cxx
+3
-1
3 additions, 1 deletion
algo/base/Options.cxx
algo/base/Options.h
+2
-0
2 additions, 0 deletions
algo/base/Options.h
reco/app/cbmreco/main.cxx
+2
-0
2 additions, 0 deletions
reco/app/cbmreco/main.cxx
with
7 additions
and
1 deletion
algo/base/Options.cxx
+
3
−
1
View file @
96fb0d24
...
...
@@ -54,7 +54,9 @@ Options::Options(int argc, char** argv)
"set log level (debug, info, warning, error, fatal)"
)
(
"monitor,m"
,
po
::
value
(
&
fMonitorUri
)
->
value_name
(
"<uri>"
)
->
implicit_value
(
"file:cout"
),
"URI specifying monitor output (e.g. file:/tmp/monitor.txt, influx1:login:8086:cbmreco_status). Prints to cout when no argument is given. Monitor is disabled when flag is not set."
)
(
"num-ts,n"
,
po
::
value
(
&
fNumTimeslices
)
->
default_value
(
-
1
)
->
value_name
(
"<num>"
),
(
"log-file,f"
,
po
::
value
(
&
fLogFile
)
->
value_name
(
"<file>"
),
"write log messages to file"
)
(
"num-ts,n"
,
po
::
value
<
int
>
(
&
fNumTimeslices
)
->
default_value
(
-
1
)
->
value_name
(
"<num>"
),
"Stop after <num> timeslices (-1 = all)"
)
(
"skip-ts,s"
,
po
::
value
(
&
fSkipTimeslices
)
->
default_value
(
0
)
->
value_name
(
"<num>"
),
"Skip first <num> timeslices"
)
...
...
This diff is collapsed.
Click to expand it.
algo/base/Options.h
+
2
−
0
View file @
96fb0d24
...
...
@@ -21,6 +21,7 @@ namespace cbm::algo
fs
::
path
ParamsDir
()
const
{
return
fParamsDir
;
}
const
std
::
string
&
InputLocator
()
const
{
return
fInputLocator
;
}
severity_level
LogLevel
()
const
{
return
fLogLevel
;
}
fs
::
path
LogFile
()
const
{
return
fLogFile
;
}
const
std
::
string
&
Device
()
const
{
return
fDevice
;
}
const
std
::
string
&
MonitorUri
()
const
{
return
fMonitorUri
;
}
bool
CollectKernelTimes
()
const
{
return
fCollectKernelTimes
;
}
...
...
@@ -31,6 +32,7 @@ namespace cbm::algo
std
::
string
fParamsDir
;
// TODO: can we make this a std::path?
std
::
string
fInputLocator
;
severity_level
fLogLevel
;
std
::
string
fLogFile
;
std
::
string
fDevice
;
std
::
string
fMonitorUri
;
bool
fCollectKernelTimes
=
false
;
...
...
This diff is collapsed.
Click to expand it.
reco/app/cbmreco/main.cxx
+
2
−
0
View file @
96fb0d24
...
...
@@ -19,6 +19,8 @@ int main(int argc, char** argv)
logging
::
add_console
(
opts
.
LogLevel
());
if
(
!
opts
.
LogFile
().
empty
())
logging
::
add_file
(
opts
.
LogFile
().
string
(),
opts
.
LogLevel
());
// XPU
xpu
::
settings
settings
;
settings
.
profile
=
opts
.
CollectKernelTimes
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment