deprec 2.1.12 → 2.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,6 +1,10 @@
1
1
  # deprec changelog
2
2
 
3
- = 2.1.10 (Sep 4, 2010)
3
+ = 2.1.13 (Sep 17, 2010)
4
+
5
+ Added syslog_ng recipes
6
+
7
+ = 2.1.10 (Sep 4, 2010)
4
8
 
5
9
  * Removed integrity recipes - causing a problem with ruby 1.9.2
6
10
 
@@ -40,6 +40,11 @@ Capistrano::Configuration.instance(:must_exist).load do
40
40
  {:template => 'syslog-ng.conf-client',
41
41
  :path => '/etc/syslog-ng/syslog-ng.conf',
42
42
  :mode => 0644,
43
+ :owner => 'root:root'},
44
+
45
+ {:template => 'apache_syslog',
46
+ :path => '/usr/local/bin/apache_syslog',
47
+ :mode => 0755,
43
48
  :owner => 'root:root'}
44
49
 
45
50
  ]
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/perl
2
+ #
3
+ # /usr/local/bin/apache_syslog
4
+ #
5
+ # Send apache logs to syslog
6
+ # http://oreilly.com/pub/a/sysadmin/2006/10/12/httpd-syslog.html
7
+ #
8
+ # Configuring Apache ##########################################
9
+ #
10
+ # # Log to syslog
11
+ # CustomLog |/usr/local/bin/apache_syslog combined
12
+ # # Also log locally (if required)
13
+ # CustomLog /usr/local/apache/logs/access_log combined
14
+ #
15
+ # Configure syslog-ng (/etc/syslog-ng/syslog-ng) ##############
16
+ #
17
+ # filter f_apache { program("apache-***"); };
18
+ #
19
+ # destination df_apache {
20
+ # file("/var/log/apache2/$PROGRAM/$YEAR$MONTH/$PROGRAM-$YEAR$MONTH$DAY"
21
+ # create_dirs(yes)
22
+ # );
23
+ # };
24
+ #
25
+ # log {
26
+ # source(s_all);
27
+ # filter (f_apache);
28
+ # destination(df_apache);
29
+ # flags(final);
30
+ # };
31
+
32
+ use Sys::Syslog qw( :DEFAULT setlogsock );
33
+
34
+ setlogsock('unix');
35
+ openlog('apache', 'cons', 'pid', 'local2');
36
+
37
+ while ($log = <STDIN>) {
38
+ syslog('notice', $log);
39
+ }
40
+ closelog
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 1
8
- - 12
9
- version: 2.1.12
8
+ - 13
9
+ version: 2.1.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mike Bailey
@@ -208,6 +208,7 @@ files:
208
208
  - lib/deprec/templates/xen/xend-config.sxp.erb
209
209
  - lib/deprec/templates/xen/xendomains.erb
210
210
  - lib/deprec/templates/syslog_ng/syslog-ng.conf-orig
211
+ - lib/deprec/templates/syslog_ng/apache_syslog
211
212
  - lib/deprec/templates/syslog_ng/syslog-ng.conf-server
212
213
  - lib/deprec/templates/syslog_ng/syslog-ng.conf-client
213
214
  - lib/deprec/templates/ssh/sshd_config.erb