Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
4d67c5a4
Commit
4d67c5a4
authored
May 05, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do nothing in case if log rotation is not enabled.
parent
0cc173a7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
+5
-1
No files found.
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
View file @
4d67c5a4
...
@@ -146,11 +146,15 @@ class Recipe(BaseSlapRecipe):
...
@@ -146,11 +146,15 @@ class Recipe(BaseSlapRecipe):
def
registerLogRotation
(
self
,
name
,
log_file_list
,
postrotate_script
):
def
registerLogRotation
(
self
,
name
,
log_file_list
,
postrotate_script
):
"""Register new log rotation requirement"""
"""Register new log rotation requirement"""
if
getattr
(
self
,
'logrotate_d'
,
None
)
is
not
None
:
open
(
os
.
path
.
join
(
self
.
logrotate_d
,
name
),
'w'
).
write
(
open
(
os
.
path
.
join
(
self
.
logrotate_d
,
name
),
'w'
).
write
(
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'logrotate_entry.in'
),
'logrotate_entry.in'
),
dict
(
file_list
=
' '
.
join
([
'"'
+
q
+
'"'
for
q
in
log_file_list
]),
dict
(
file_list
=
' '
.
join
([
'"'
+
q
+
'"'
for
q
in
log_file_list
]),
postrotate
=
postrotate_script
,
olddir
=
self
.
logrotate_backup
)))
postrotate
=
postrotate_script
,
olddir
=
self
.
logrotate_backup
)))
else
:
self
.
logger
.
warning
(
'No log rotation configured for %r, as log rotate '
'is not configured'
%
name
)
def
linkBinary
(
self
):
def
linkBinary
(
self
):
"""Links binaries to instance's bin directory for easier exposal"""
"""Links binaries to instance's bin directory for easier exposal"""
...
...
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