Revision 7a5f9bd5
Gestion des logs dans les interfaces web
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@3386 b22e2e97-25c9-44ff-b637-2e5ceca36478
Makefile | ||
---|---|---|
6 | 6 |
mkdir -p $(DESTDIR)$(HTTPD_DIR) |
7 | 7 |
ln -f -s $(SYSCONFDIR)/vigilo/vigiboard/vigiboard.conf $(DESTDIR)$(HTTPD_DIR)/ |
8 | 8 |
echo $(HTTPD_DIR)/vigiboard.conf >> INSTALLED_FILES |
9 |
install -p -m 644 -D deployment/logrotate $(DESTDIR)$(SYSCONFDIR)/logrotate.d/$(NAME) |
|
10 |
echo $(SYSCONFDIR)/logrotate.d/$(NAME) >> INSTALLED_FILES |
|
11 |
mkdir -p /var/log/vigilo/$(NAME) |
|
9 | 12 |
|
10 | 13 |
include buildenv/Makefile.common |
11 | 14 |
|
deployment/logrotate | ||
---|---|---|
1 |
/var/log/vigilo/vigiboard/*.log { |
|
2 |
rotate 12 |
|
3 |
monthly |
|
4 |
notifempty |
|
5 |
compress |
|
6 |
} |
deployment/settings.ini | ||
---|---|---|
91 | 91 |
|
92 | 92 |
; If you create additional loggers, add them as a key to [loggers] |
93 | 93 |
[logger_root] |
94 |
level = DEBUG
|
|
94 |
level = INFO
|
|
95 | 95 |
handlers = root_log |
96 | 96 |
|
97 | 97 |
[logger_vigiboard] |
98 |
level = DEBUG
|
|
98 |
level = INFO
|
|
99 | 99 |
handlers = vigiboard_log |
100 | 100 |
qualname = vigiboard |
101 | 101 |
|
102 | 102 |
[logger_sqlalchemy] |
103 |
level = DEBUG
|
|
103 |
level = INFO
|
|
104 | 104 |
handlers = sql_log |
105 | 105 |
qualname = sqlalchemy.engine |
106 | 106 |
|
107 | 107 |
; A logger for authentication, identification and authorization -- this is |
108 | 108 |
; repoze.who and repoze.what: |
109 | 109 |
[logger_auth] |
110 |
level = DEBUG
|
|
110 |
level = INFO
|
|
111 | 111 |
handlers = auth_log |
112 | 112 |
qualname = auth |
113 | 113 |
|
... | ... | |
120 | 120 |
|
121 | 121 |
[handler_sql_log] |
122 | 122 |
class = FileHandler |
123 |
args = ('log/sql.log','a')
|
|
123 |
args = ('/var/log/vigilo/vigiboard/sql.log','a')
|
|
124 | 124 |
level = DEBUG |
125 | 125 |
formatter = generic |
126 | 126 |
|
127 | 127 |
[handler_root_log] |
128 | 128 |
class = FileHandler |
129 |
args = ('log/root.log','a')
|
|
129 |
args = ('/var/log/vigilo/vigiboard/root.log','a')
|
|
130 | 130 |
level = DEBUG |
131 | 131 |
formatter = generic |
132 | 132 |
|
133 | 133 |
[handler_vigiboard_log] |
134 | 134 |
class = FileHandler |
135 |
args = ('log/vigiboard.log','a')
|
|
135 |
args = ('/var/log/vigilo/vigiboard/vigiboard.log','a')
|
|
136 | 136 |
level = DEBUG |
137 | 137 |
formatter = generic |
138 | 138 |
|
139 | 139 |
[handler_auth_log] |
140 | 140 |
class = FileHandler |
141 |
args = ('log/auth.log','a')
|
|
141 |
args = ('/var/log/vigilo/vigiboard/auth.log','a')
|
|
142 | 142 |
level = DEBUG |
143 | 143 |
formatter = generic |
144 | 144 |
|
deployment/vigiboard.wsgi | ||
---|---|---|
8 | 8 |
|
9 | 9 |
#os.environ['PYTHON_EGG_CACHE'] = '/tmp/vigiboard/python-eggs' |
10 | 10 |
|
11 |
#from paste.script.util.logging_config import fileConfig |
|
12 |
#fileConfig(basedir + ini_file) |
|
13 |
|
|
14 | 11 |
import os.path |
15 | 12 |
ini_file = '/etc/vigilo/vigiboard/settings.ini' |
16 | 13 |
ini_file = os.path.join('/', *ini_file.split('/')) |
... | ... | |
18 | 15 |
from paste.deploy import loadapp |
19 | 16 |
application = loadapp('config:%s' % ini_file) |
20 | 17 |
|
18 |
from paste.script.util.logging_config import fileConfig |
|
19 |
fileConfig(ini_file) |
|
20 |
|
pkg/vigiboard.mdv.spec | ||
---|---|---|
59 | 59 |
%dir %{_sysconfdir}/vigilo |
60 | 60 |
%config(noreplace) %{_sysconfdir}/vigilo/%{module} |
61 | 61 |
%{_sysconfdir}/httpd/conf/webapps.d/%{module}.conf |
62 |
%config(noreplace) %{_sysconfdir}/logrotate.d/%{module} |
|
63 |
%dir %{_localstatedir}/log/vigilo/ |
|
64 |
%attr(750,apache,apache) %{_localstatedir}/log/vigilo/%{module} |
|
62 | 65 |
%{python_sitelib}/* |
63 | 66 |
|
64 |
|
|
65 |
%changelog |
|
66 |
* Mon Feb 08 2010 Aurelien Bompard <aurelien.bompard@c-s.fr> |
|
67 |
- initial package |
Also available in: Unified diff