Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit c5e678b

Browse files
authored
Merge pull request #74 from mnecas/add_ovirt_logrotate_patch
add ovirt logrotate patch
2 parents c5dece8 + 5712f5b commit c5e678b

File tree

4 files changed

+55
-8
lines changed

4 files changed

+55
-8
lines changed

misc/packaging/apache/ansible-runner-service.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Version: 1.0.3
55
Release: 1%{?dist}
66
Summary: RESTful API for ansible/ansible_runner execution
77
Source0: https://github.com/ansible/%{name}/archive/%{name}-%{version}.tar.gz
8+
Patch0: ovirt_log.patch
89
Group: Applications/System
910
License: ASL 2.0
1011

@@ -42,6 +43,7 @@ In addition to the API endpoints, the daemon also provides a /metrics endpoint f
4243

4344
%prep
4445
%setup -q -n %{name}-%{version}
46+
%patch0 -p1
4547

4648
%build
4749
# Disable debuginfo packages
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff --git a/logging.yaml b/logging.yaml
2+
index 8357727..16a0c1c 100644
3+
--- a/logging.yaml
4+
+++ b/logging.yaml
5+
@@ -7,21 +7,13 @@ formatters:
6+
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
7+
8+
handlers:
9+
- console:
10+
- class: logging.StreamHandler
11+
- level: DEBUG
12+
- formatter: simple
13+
- stream: ext://sys.stdout
14+
-
15+
file_handler:
16+
- class: logging.handlers.RotatingFileHandler
17+
+ class: logging.handlers.WatchedFileHandler
18+
level: DEBUG
19+
formatter: simple
20+
- filename: ansible-runner-service.log
21+
+ filename: /var/log/ovirt-engine/ansible-runner-service.log
22+
- maxBytes: 10485760 # 10MB
23+
- backupCount: 20
24+
encoding: utf8
25+
26+
root:
27+
level: DEBUG
28+
- handlers: [console, file_handler]
29+
+ handlers: [file_handler]
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/var/log/ansible-runner-service.log {
2-
monthly
2+
weekly
33
missingok
44
compress
5-
nocreate
6-
rotate 1
5+
create
6+
rotate 4
77
}

packaging/gunicorn/ovirt_log.patch

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
diff --git a/logging.yaml b/logging.yaml
2-
index 8357727..a883306 100644
2+
index 8357727..16a0c1c 100644
33
--- a/logging.yaml
44
+++ b/logging.yaml
5-
@@ -17,7 +17,7 @@ handlers:
6-
class: logging.handlers.RotatingFileHandler
5+
@@ -7,21 +7,13 @@ formatters:
6+
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
7+
8+
handlers:
9+
- console:
10+
- class: logging.StreamHandler
11+
- level: DEBUG
12+
- formatter: simple
13+
- stream: ext://sys.stdout
14+
-
15+
file_handler:
16+
- class: logging.handlers.RotatingFileHandler
17+
+ class: logging.handlers.WatchedFileHandler
718
level: DEBUG
819
formatter: simple
920
- filename: ansible-runner-service.log
1021
+ filename: /var/log/ovirt-engine/ansible-runner-service.log
11-
maxBytes: 10485760 # 10MB
12-
backupCount: 20
22+
- maxBytes: 10485760 # 10MB
23+
- backupCount: 20
1324
encoding: utf8
25+
26+
root:
27+
level: DEBUG
28+
- handlers: [console, file_handler]
29+
+ handlers: [file_handler]

0 commit comments

Comments
 (0)