Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hidra
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
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
steinbac
hidra
Commits
4106c8df
Commit
4106c8df
authored
9 years ago
by
Manuela Kuhn
Browse files
Options
Downloads
Patches
Plain Diff
Fixed logfile name with date
parent
e533f355
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
conf/config.py
+14
-7
14 additions, 7 deletions
conf/config.py
src/sender.py
+1
-5
1 addition, 5 deletions
src/sender.py
with
15 additions
and
12 deletions
conf/config.py
+
14
−
7
View file @
4106c8df
import
os
import
sys
import
datetime
BASE_PATH
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)
)
)
)
ZMQ_PATH
=
BASE_PATH
+
os
.
sep
+
"
src
"
+
os
.
sep
+
"
ZeroMQTunnel
"
...
...
@@ -8,12 +9,15 @@ sys.path.append ( ZMQ_PATH )
import
helperScript
#LOCAL_IP= "0.0.0.0"
#LOCAL_IP= "127.0.0.1"
LOCAL_IP
=
"
131.169.66.47
"
#LOCAL_IP
= "0.0.0.0"
#LOCAL_IP
= "127.0.0.1"
LOCAL_IP
=
"
131.169.66.47
"
#BASE_PATH = "/space/projects/live-viewer"
BASE_PATH
=
"
/home/p11user/live-viewer
"
BASE_PATH
=
"
/home/p11user/live-viewer
"
now
=
datetime
.
datetime
.
now
()
nowFormated
=
now
.
strftime
(
"
%Y-%m-%d
"
)
class
defaultConfigSender
():
...
...
@@ -24,7 +28,7 @@ class defaultConfigSender():
watchFolder
=
"
/rd_temp/
"
# Target to move the files into
# cleanerTargetPath = BASE_PATH + "/data/target/"
cleanerTargetPath
=
"
/gpfs/
"
cleanerTargetPath
=
"
/gpfs/
"
# cleanerTargetPath = "/rd/temp/"
# subfolders of watchFolders to be monitored
...
...
@@ -73,8 +77,10 @@ class defaultConfigSender():
# path where logfile will be created
logfilePath
=
"
/home/p11user/logs
"
# logfilePath = BASE_PATH + "/logs"
# filename used for logging
logfileName
=
"
zmq_sender.log
"
logfileName
=
"
zmq_sender.log
_
"
+
nowFormated
def
__init__
(
self
):
...
...
@@ -111,8 +117,9 @@ class defaultConfigReceiver():
# path where logfile will be created
logfilePath
=
BASE_PATH
+
"
/logs
"
# logfilePath = "/home/p11user/logs"
# filename used for logging
logfileName
=
"
zmq_receiver.log
"
logfileName
=
"
zmq_receiver.log
_
"
+
nowFormated
# size of the ring buffer for the live viewer
maxRingBufferSize
=
10
...
...
This diff is collapsed.
Click to expand it.
src/sender.py
+
1
−
5
View file @
4106c8df
...
...
@@ -24,8 +24,6 @@ from Cleaner import Cleaner
from
config
import
defaultConfigSender
import
datetime
class
Sender
():
logfilePath
=
None
logfileName
=
None
...
...
@@ -56,9 +54,7 @@ class Sender():
defConf
=
defaultConfigSender
()
self
.
logfilePath
=
defConf
.
logfilePath
now
=
datetime
.
datetime
.
now
()
nowFormated
=
now
.
strftime
(
"
%Y-%m-%d_%H:%M
"
)
self
.
logfileName
=
defConf
.
logfileName
+
"
_
"
+
nowFormated
self
.
logfileName
=
defConf
.
logfileName
self
.
logfileFullPath
=
os
.
path
.
join
(
self
.
logfilePath
,
self
.
logfileName
)
self
.
verbose
=
verbose
...
...
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