aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_db.h
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2010-04-26 17:11:15 -0700
committerPeter Seebach <peter.seebach@windriver.com>2010-04-26 17:13:45 -0700
commit2cc5cc8fb02ce787753f2b3903864c7e1b98bd4d (patch)
tree16456f1998a2e3754393951e569292c0bea09ccf /pseudo_db.h
parent4038d0599e135ea0099a2392e0421bcc1d053825 (diff)
downloadpseudo-2cc5cc8fb02ce787753f2b3903864c7e1b98bd4d.tar.gz
pseudo-2cc5cc8fb02ce787753f2b3903864c7e1b98bd4d.tar.bz2
pseudo-2cc5cc8fb02ce787753f2b3903864c7e1b98bd4d.zip
Updates/improvements for logging
Send program name (program_invocation_name from glibc) along with the tag. Along the way, restructure the fds/pids/tags arrays to be an array of client structures in pseudo_server, and add the message type to the set of things logged -- logging that a message was a ping is more useful than appending the text "ping" to it. Add support for type and program to pseudolog. Add deletion to pseudolog. Handle usage message formatting when there's an odd number of known specifiers for pseudolog. Conflicts: ChangeLog.txt pseudo_server.c
Diffstat (limited to 'pseudo_db.h')
-rw-r--r--pseudo_db.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/pseudo_db.h b/pseudo_db.h
index 9b82c53..aeacc95 100644
--- a/pseudo_db.h
+++ b/pseudo_db.h
@@ -19,6 +19,7 @@
*/
typedef struct {
time_t stamp;
+ pseudo_msg_type_t type;
op_id_t op;
int access;
unsigned long client;
@@ -33,6 +34,7 @@ typedef struct {
sev_id_t severity;
char *text;
char *tag;
+ char *program;
} log_entry;
extern int pdb_link_file(pseudo_msg_t *msg);
@@ -63,10 +65,10 @@ typedef struct pseudo_query {
} pseudo_query_t;
extern int pdb_log_entry(log_entry *e);
-extern int pdb_log_msg(sev_id_t severity, pseudo_msg_t *msg, const char *tag, const char *text, ...);
+extern int pdb_log_msg(sev_id_t severity, pseudo_msg_t *msg, const char *program, const char *tag, const char *text, ...);
extern int pdb_log_traits(pseudo_query_t *traits);
-extern log_history pdb_history(pseudo_query_t *traits, unsigned long fields, int distinct);
+extern log_history pdb_history(pseudo_query_t *traits, unsigned long fields, int unique, int delete);
extern log_entry *pdb_history_entry(log_history h);
extern void pdb_history_free(log_history h);
extern void log_entry_free(log_entry *);