journald-native 1.0.6 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,45 +0,0 @@
1
- #ifndef JOURNALD_NATIVE_SD_JOURNAL_H
2
- #define JOURNALD_NATIVE_SD_JOURNAL_H
3
-
4
- #ifdef __linux__
5
-
6
- #define JOURNALD_NATIVE_SD_JOURNAL_DUMMY false
7
-
8
- /* do the real stuff */
9
-
10
- #include "extconf.h"
11
-
12
- /* check for extconf results */
13
-
14
- #ifndef HAVE_SYSTEMD_SD_JOURNAL_H
15
- #error Cannot include <systemd/sd-journal.h>. Please use linux version with systemd-journal installed
16
- #endif
17
-
18
- #ifndef HAVE_SD_JOURNAL_PRINT
19
- #error Required function sd_journal_print is missing
20
- #endif
21
-
22
- #ifndef HAVE_SD_JOURNAL_SENDV
23
- #error Required function sd_journal_sendv is missing
24
- #endif
25
-
26
- #ifndef HAVE_SD_JOURNAL_PERROR
27
- #error Required function sd_journal_perror is missing
28
- #endif
29
-
30
- /* Do not add C line and file to the log messages */
31
- #define SD_JOURNAL_SUPPRESS_LOCATION
32
- /* include systemd-journal headers */
33
- #include <systemd/sd-journal.h>
34
-
35
- #else
36
-
37
- #define JOURNALD_NATIVE_SD_JOURNAL_DUMMY true
38
-
39
- #warning Compiling dummy version of the gem for non-Linux OS
40
-
41
- #include "sd_journal_dummy.h"
42
-
43
- #endif
44
-
45
- #endif // JOURNALD_NATIVE_SD_JOURNAL_H
@@ -1,23 +0,0 @@
1
- /* dummy code to be used in sd_journal.h on non-linux system */
2
-
3
- #include <stdlib.h>
4
-
5
- /* syslog constants */
6
- #define LOG_EMERG 0
7
- #define LOG_ALERT 1
8
- #define LOG_CRIT 2
9
- #define LOG_ERR 3
10
- #define LOG_WARNING 4
11
- #define LOG_NOTICE 5
12
- #define LOG_INFO 6
13
- #define LOG_DEBUG 7
14
-
15
- /* iovec */
16
- struct iovec {
17
- void *iov_base; /* Starting address */
18
- size_t iov_len; /* Number of bytes to transfer */
19
- };
20
-
21
- inline int sd_journal_print(int priority, const char *format, ...) { return 0; }
22
- inline int sd_journal_sendv(const struct iovec *iov, int n) { return 0; }
23
- inline int sd_journal_perror(const char *message) { return 0; }
@@ -1,27 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'journald/native/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'journald-native'
8
- spec.version = Journald::Native::VERSION
9
- spec.authors = ['Anton Smirnov']
10
- spec.email = ['sandfox@sandfox.im']
11
- spec.summary = %q{systemd-journal logging native lib wrapper}
12
- # spec.description = %q{Write a longer description. Optional.}
13
- spec.homepage = 'https://github.com/sandfox-im/journald-native'
14
- spec.license = 'MIT'
15
-
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
- spec.require_paths = ['lib']
19
-
20
- spec.extensions << 'ext/journald_native/extconf.rb'
21
-
22
- spec.required_ruby_version = '>= 1.9.2'
23
-
24
- spec.add_development_dependency 'bundler', '~> 1.6'
25
- spec.add_development_dependency 'rake'
26
- spec.add_development_dependency 'rake-compiler'
27
- end