Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hddtempserial
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleg Nikulin
hddtempserial
Commits
aca96e01
Commit
aca96e01
authored
Jul 26, 2024
by
Oleg Nikulin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ротация логов
parent
e711f2bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
general.py
general.py
+3
-1
No files found.
general.py
View file @
aca96e01
...
@@ -8,6 +8,8 @@ import threading
...
@@ -8,6 +8,8 @@ import threading
from
threading
import
Event
from
threading
import
Event
import
json
import
json
import
logging
import
logging
import
logging.handlers
import
sys
import
sys
import
traceback
import
traceback
import
os
import
os
...
@@ -34,7 +36,7 @@ logger = logging.getLogger(__name__)
...
@@ -34,7 +36,7 @@ logger = logging.getLogger(__name__)
logger
.
setLevel
(
logging
.
DEBUG
)
logger
.
setLevel
(
logging
.
DEBUG
)
logFormatter_file
=
logging
.
Formatter
(
'
%(asctime)
s
%(levelname)
s:
%(message)
s'
,
'
%
d.
%
m.
%
Y
%
H:
%
M:
%
S'
)
logFormatter_file
=
logging
.
Formatter
(
'
%(asctime)
s
%(levelname)
s:
%(message)
s'
,
'
%
d.
%
m.
%
Y
%
H:
%
M:
%
S'
)
logHandler_file
=
logging
.
FileHandler
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'hddtempserial.log'
)
)
logHandler_file
=
logging
.
handlers
.
RotatingFileHandler
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'hddtempserial.log'
),
maxBytes
=
64
*
1024
*
1024
,
backupCount
=
5
)
logHandler_file
.
setLevel
(
logging
.
DEBUG
)
logHandler_file
.
setLevel
(
logging
.
DEBUG
)
logHandler_file
.
setFormatter
(
logFormatter_file
)
logHandler_file
.
setFormatter
(
logFormatter_file
)
logger
.
addHandler
(
logHandler_file
)
logger
.
addHandler
(
logHandler_file
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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