Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FofbTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
DG
FOFB
FofbTool
Commits
e501f713
Commit
e501f713
authored
8 months ago
by
BRONES Romain
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev_filelog' into sync_fofbmanager
parents
864c1f6e
bca5fdeb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/FofbTool
+11
-0
11 additions, 0 deletions
scripts/FofbTool
with
11 additions
and
0 deletions
scripts/FofbTool
+
11
−
0
View file @
e501f713
...
...
@@ -29,6 +29,17 @@ if __name__ == '__main__':
sh
.
setFormatter
(
logging
.
Formatter
(
"
{levelname:8}: {message}
"
,
style
=
'
{
'
))
logger
.
addHandler
(
sh
)
# Add a file handler
logpath
=
"
/home/data/DG/FOFB/FofbTool.log
"
try
:
fh
=
logging
.
FileHandler
(
logpath
)
except
FileNotFoundError
:
logger
.
warning
(
"
Not logging to file, could not open location {}
"
.
format
(
logpath
))
else
:
fh
.
setLevel
(
logging
.
DEBUG
)
fh
.
setFormatter
(
logging
.
Formatter
(
"
{levelname:8}: {message}
"
,
style
=
'
{
'
))
logger
.
addHandler
(
fh
)
parser
=
argparse
.
ArgumentParser
(
"
FofbTool
"
,
description
=
"
version {}
"
.
format
(
FofbTool
.
__version__
))
parser
.
add_argument
(
"
--log
"
,
default
=
"
info
"
,
help
=
"
Log level (error, warning, info, debug)
"
)
...
...
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