diff options
author | Guillaume Friloux <kuri@e4.enlightenment.org> | 2013-06-04 16:32:54 +0200 |
---|---|---|
committer | Guillaume Friloux <kuri@e4.enlightenment.org> | 2013-06-04 16:32:54 +0200 |
commit | 79834374f4f297386d6876c3c692c06929cc219f (patch) | |
tree | ff43c8f0e1869e522affa089dbfeb993ef93445a | |
parent | cc4ff2c409f9ab24b3348f3abb06521e6c5aadf5 (diff) |
Fuck you 32 bits.
-rw-r--r-- | src/bin/Makefile.am | 2 | ||||
-rw-r--r-- | src/bin/logfiles.c | 6 | ||||
-rw-r--r-- | src/bin/main.c | 6 | ||||
-rw-r--r-- | src/bin/spy.c | 5 |
4 files changed, 8 insertions, 11 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 777e147..9742849 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am | |||
@@ -5,4 +5,4 @@ bin_PROGRAMS = smman | |||
5 | smman_SOURCES = main.c rules.c spy.c logfiles.c send.c date.c conf.c logmessages.c libconf.c | 5 | smman_SOURCES = main.c rules.c spy.c logfiles.c send.c date.c conf.c logmessages.c libconf.c |
6 | 6 | ||
7 | smman_LDFLAGS = @eina_LIBS@ @ecore_LIBS@ @libcurl_LIBS@ | 7 | smman_LDFLAGS = @eina_LIBS@ @ecore_LIBS@ @libcurl_LIBS@ |
8 | smman_CPPFLAGS = -W -Wall -O2 -g @eina_CFLAGS@ @ecore_CFLAGS@ @libcurl_CFLAGS@ -DREVISION=\"@revision_number@\" -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS | 8 | smman_CPPFLAGS = -W -Wall -O2 -g @eina_CFLAGS@ @ecore_CFLAGS@ @libcurl_CFLAGS@ -DREVISION=\"@revision_number@\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE |
diff --git a/src/bin/logfiles.c b/src/bin/logfiles.c index 9865a7c..b1297ad 100644 --- a/src/bin/logfiles.c +++ b/src/bin/logfiles.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
@@ -41,7 +41,6 @@ int logfiles_exist(char *logfile) | |||
41 | { | 41 | { |
42 | Eina_List *l; | 42 | Eina_List *l; |
43 | struct logfile *foundlogfile = NULL; | 43 | struct logfile *foundlogfile = NULL; |
44 | |||
45 | EINA_LIST_FOREACH(list_logfiles, l, foundlogfile) | 44 | EINA_LIST_FOREACH(list_logfiles, l, foundlogfile) |
46 | { | 45 | { |
47 | if( !strcmp(foundlogfile->name, logfile) ) | 46 | if( !strcmp(foundlogfile->name, logfile) ) |
@@ -78,10 +77,9 @@ int logfiles_print(void) | |||
78 | { | 77 | { |
79 | Eina_List *l; | 78 | Eina_List *l; |
80 | struct logfile *foundlogfile = NULL; | 79 | struct logfile *foundlogfile = NULL; |
81 | |||
82 | EINA_LIST_FOREACH(list_logfiles, l, foundlogfile) | 80 | EINA_LIST_FOREACH(list_logfiles, l, foundlogfile) |
83 | { | 81 | { |
84 | EINA_LOG_DOM_INFO(einadom_logfiles, "Name = %s\tCursor = %d", foundlogfile->name, foundlogfile->cursor); | 82 | EINA_LOG_DOM_INFO(einadom_logfiles, "Name = %s", foundlogfile->name); |
85 | } | 83 | } |
86 | return(0); | 84 | return(0); |
87 | } | 85 | } |
diff --git a/src/bin/main.c b/src/bin/main.c index 3e6ff8b..7a4e891 100644 --- a/src/bin/main.c +++ b/src/bin/main.c | |||
@@ -36,18 +36,18 @@ | |||
36 | * @author Guillaume Friloux <guillaume.friloux@asp64.com> | 36 | * @author Guillaume Friloux <guillaume.friloux@asp64.com> |
37 | * | 37 | * |
38 | * @section INTRODUCTION Introduction | 38 | * @section INTRODUCTION Introduction |
39 | * SMMan is gateway between syslog files and an <a href=www.elasticsearch.com>ElasticSearch</a> database.<br /> | 39 | * SMMan is gateway between syslog files and an <a href=http://www.elasticsearch.com>ElasticSearch</a> database.<br /> |
40 | * SMMan has a few more interesting stuff : He can tag every log he sees by using defined rules on them.<br /> | 40 | * SMMan has a few more interesting stuff : He can tag every log he sees by using defined rules on them.<br /> |
41 | * SMMan uses a configuration file, and needs rules files that must be written by the user of SMMan.<br /> | 41 | * SMMan uses a configuration file, and needs rules files that must be written by the user of SMMan.<br /> |
42 | * SMMan will then use these rules to monitor all the specified logfiles (using inotify), and extract every new entry | 42 | * SMMan will then use these rules to monitor all the specified logfiles (using inotify), and extract every new entry |
43 | * to filter it using the rules and then indexing it in the configured <a href=www.elasticsearch.com>ElasticSearch</a> database. | 43 | * to filter it using the rules and then indexing it in the configured <a href=http://www.elasticsearch.com>ElasticSearch</a> database. |
44 | * <img src=intro.png> | 44 | * <img src=intro.png> |
45 | * | 45 | * |
46 | * <br /> | 46 | * <br /> |
47 | * @section CONFIGURATION Configuration | 47 | * @section CONFIGURATION Configuration |
48 | * The configuration file has to be in <b>/etc/smman/smman.conf</b><br /> | 48 | * The configuration file has to be in <b>/etc/smman/smman.conf</b><br /> |
49 | * For now, there is only 3 configurable variables : | 49 | * For now, there is only 3 configurable variables : |
50 | * @li @b server : URL to <a href=www.elasticsearch.com>ElasticSearch</a> database. SMMan speaks to <a href=www.elasticsearch.com>ElasticSearch</a> using JSON. | 50 | * @li @b server : URL to <a href=http://www.elasticsearch.com>ElasticSearch</a> database. SMMan speaks to <a href=http://www.elasticsearch.com>ElasticSearch</a> using JSON. |
51 | * @li @b host : Allows you to set a different host that the one returned by command hostname (optionnal). | 51 | * @li @b host : Allows you to set a different host that the one returned by command hostname (optionnal). |
52 | * @li @b type : Default type for all logs (optionnal). | 52 | * @li @b type : Default type for all logs (optionnal). |
53 | * | 53 | * |
diff --git a/src/bin/spy.c b/src/bin/spy.c index 0903059..f97d0e1 100644 --- a/src/bin/spy.c +++ b/src/bin/spy.c | |||
@@ -70,7 +70,7 @@ int spy_addwatcher(struct rule *foundrule) | |||
70 | return(-1); | 70 | return(-1); |
71 | } | 71 | } |
72 | 72 | ||
73 | EINA_LOG_DOM_DBG(einadom_spy, "Found %d results for %s", p.we_wordc, foundrule->filename); | 73 | EINA_LOG_DOM_DBG(einadom_spy, "Found %zu results for %s", p.we_wordc, foundrule->filename); |
74 | 74 | ||
75 | // We now have a list of files (or a unique file) and we want to add them | 75 | // We now have a list of files (or a unique file) and we want to add them |
76 | // To our file list | 76 | // To our file list |
@@ -156,7 +156,7 @@ int spy_event(void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const | |||
156 | } | 156 | } |
157 | log->filesize = filesize; | 157 | log->filesize = filesize; |
158 | 158 | ||
159 | EINA_LOG_DOM_DBG(einadom_spy, "Event on %s - %d !", path, log->cursor); | 159 | EINA_LOG_DOM_DBG(einadom_spy, "Event on %s !", path); |
160 | 160 | ||
161 | // We must take attention to the fact that the file might | 161 | // We must take attention to the fact that the file might |
162 | // Have been truncated | 162 | // Have been truncated |
@@ -348,7 +348,6 @@ int spy_extract_new_lines(char *filename, fpos_t pos_cur, fpos_t *pos_new, char | |||
348 | if( ret != 1 ) | 348 | if( ret != 1 ) |
349 | { | 349 | { |
350 | fgetpos(fp, pos_new); | 350 | fgetpos(fp, pos_new); |
351 | EINA_LOG_DOM_DBG(einadom_spy, "Break! new_pos = %d", *pos_new); | ||
352 | break; | 351 | break; |
353 | } | 352 | } |
354 | else | 353 | else |