Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PythonLibs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
TheCodeLabs
PythonLibs
Commits
40cc474e
Commit
40cc474e
authored
4 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
BaseUtils: allow to set a log level for the rotating file handler
parent
75fbe507
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
TheCodeLabs_BaseUtils/TheCodeLabs_BaseUtils/DefaultLogger.py
+2
-1
2 additions, 1 deletion
TheCodeLabs_BaseUtils/TheCodeLabs_BaseUtils/DefaultLogger.py
TheCodeLabs_BaseUtils/setup.py
+1
-1
1 addition, 1 deletion
TheCodeLabs_BaseUtils/setup.py
with
3 additions
and
2 deletions
TheCodeLabs_BaseUtils/TheCodeLabs_BaseUtils/DefaultLogger.py
+
2
−
1
View file @
40cc474e
...
@@ -51,6 +51,7 @@ class DefaultLogger:
...
@@ -51,6 +51,7 @@ class DefaultLogger:
@classmethod
@classmethod
def
add_rotating_file_handler
(
cls
,
logger
:
logging
.
Logger
,
def
add_rotating_file_handler
(
cls
,
logger
:
logging
.
Logger
,
logLevel
=
logging
.
DEBUG
,
logFormat
=
None
,
logFormat
=
None
,
dateFormat
=
None
,
dateFormat
=
None
,
fileName
=
'
log.log
'
,
fileName
=
'
log.log
'
,
...
@@ -62,7 +63,7 @@ class DefaultLogger:
...
@@ -62,7 +63,7 @@ class DefaultLogger:
maxBytes
=
maxBytes
,
maxBytes
=
maxBytes
,
backupCount
=
backupCount
)
backupCount
=
backupCount
)
outRotatingFileHandler
.
setFormatter
(
logFormatter
)
outRotatingFileHandler
.
setFormatter
(
logFormatter
)
outRotatingFileHandler
.
setLevel
(
log
ging
.
DEBUG
)
outRotatingFileHandler
.
setLevel
(
log
Level
)
logger
.
addHandler
(
outRotatingFileHandler
)
logger
.
addHandler
(
outRotatingFileHandler
)
return
logger
return
logger
...
...
This diff is collapsed.
Click to expand it.
TheCodeLabs_BaseUtils/setup.py
+
1
−
1
View file @
40cc474e
...
@@ -3,7 +3,7 @@ from setuptools import setup
...
@@ -3,7 +3,7 @@ from setuptools import setup
setup
(
setup
(
name
=
'
TheCodeLabs-BaseUtils
'
,
name
=
'
TheCodeLabs-BaseUtils
'
,
packages
=
[
'
TheCodeLabs_BaseUtils
'
],
packages
=
[
'
TheCodeLabs_BaseUtils
'
],
version
=
'
1.4.
0
'
,
version
=
'
1.4.
1
'
,
license
=
'
MIT
'
,
license
=
'
MIT
'
,
description
=
'
Useful python classes
'
,
description
=
'
Useful python classes
'
,
author
=
'
TheCodeLabs
'
,
author
=
'
TheCodeLabs
'
,
...
...
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