Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
914e177a
Commit
914e177a
authored
Sep 16, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove contrib/pg_logger, per recent discussion.
parent
1cfd2012
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
129 deletions
+1
-129
contrib/Makefile
contrib/Makefile
+1
-2
contrib/README
contrib/README
+0
-4
contrib/pg_logger/Makefile
contrib/pg_logger/Makefile
+0
-16
contrib/pg_logger/README.pg_logger
contrib/pg_logger/README.pg_logger
+0
-1
contrib/pg_logger/pg_logger.c
contrib/pg_logger/pg_logger.c
+0
-106
No files found.
contrib/Makefile
View file @
914e177a
# $PostgreSQL: pgsql/contrib/Makefile,v 1.5
0 2004/08/28 21:36:24
tgl Exp $
# $PostgreSQL: pgsql/contrib/Makefile,v 1.5
1 2004/09/16 21:20:19
tgl Exp $
subdir
=
contrib
top_builddir
=
..
...
...
@@ -26,7 +26,6 @@ WANTED_DIRS = \
oid2name
\
pg_autovacuum
\
pg_dumplo
\
pg_logger
\
pg_trgm
\
pgbench
\
pgcrypto
\
...
...
contrib/README
View file @
914e177a
...
...
@@ -140,10 +140,6 @@ pg_dumplo -
Dump large objects
by Karel Zak <zakkr@zf.jcu.cz>
pg_logger -
Stdin-to-syslog gateway for PostgreSQL
by Nathan Myers <ncm@nospam.cantrip.org>
pg_trgm -
Functions for determining the similarity of text based on trigram
matching.
...
...
contrib/pg_logger/Makefile
deleted
100644 → 0
View file @
1cfd2012
# $PostgreSQL: pgsql/contrib/pg_logger/Makefile,v 1.4 2004/08/20 20:13:06 momjian Exp $
PROGRAM
=
pg_logger
OBJS
=
pg_logger.o
DOCS
=
README.pg_logger
ifdef
USE_PGXS
PGXS
=
$(
shell
pg_config
--pgxs
)
include
$(PGXS)
else
subdir
=
contrib/pg_logger
top_builddir
=
../..
include
$(top_builddir)/src/Makefile.global
include
$(top_srcdir)/contrib/contrib-global.mk
endif
contrib/pg_logger/README.pg_logger
deleted
100644 → 0
View file @
1cfd2012
Stdin-to-syslog gateway for PostgreSQL
contrib/pg_logger/pg_logger.c
deleted
100644 → 0
View file @
1cfd2012
/* pg_logger: stdin-to-syslog gateway for postgresql.
*
* Copyright 2001 by Nathan Myers <ncm@nospam.cantrip.org>
* This software is distributed free of charge with no warranty of any kind.
* You have permission to make copies for any purpose, provided that (1)
* this copyright notice is retained unchanged, and (2) you agree to
* absolve the author of all responsibility for all consequences arising
* from any use.
*/
#include <stdio.h>
#include <stddef.h>
#include <syslog.h>
#include <string.h>
struct
{
const
char
*
tag
;
int
size
;
int
priority
;
}
tags
[]
=
{
{
""
,
0
,
LOG_NOTICE
},
{
"emerg:"
,
sizeof
(
"emerg"
),
LOG_EMERG
},
{
"alert:"
,
sizeof
(
"alert"
),
LOG_ALERT
},
{
"crit:"
,
sizeof
(
"crit"
),
LOG_CRIT
},
{
"err:"
,
sizeof
(
"err"
),
LOG_ERR
},
{
"error:"
,
sizeof
(
"error"
),
LOG_ERR
},
{
"warning:"
,
sizeof
(
"warning"
),
LOG_WARNING
},
{
"notice:"
,
sizeof
(
"notice"
),
LOG_NOTICE
},
{
"info:"
,
sizeof
(
"info"
),
LOG_INFO
},
{
"debug:"
,
sizeof
(
"debug"
),
LOG_DEBUG
}
};
int
main
()
{
char
buf
[
301
];
int
c
;
char
*
pos
=
buf
;
const
char
*
colon
=
0
;
#ifndef DEBUG
openlog
(
"postgresql"
,
LOG_CONS
,
LOG_LOCAL1
);
#endif
while
((
c
=
getchar
())
!=
EOF
)
{
if
(
c
==
'\r'
)
continue
;
if
(
c
==
'\n'
)
{
int
level
=
sizeof
(
tags
)
/
sizeof
(
*
tags
);
char
*
bol
;
if
(
colon
==
0
||
(
size_t
)
(
colon
-
buf
)
>
sizeof
(
"warning"
))
level
=
1
;
*
pos
=
0
;
while
(
--
level
)
{
if
(
pos
-
buf
>=
tags
[
level
].
size
&&
strncmp
(
buf
,
tags
[
level
].
tag
,
tags
[
level
].
size
)
==
0
)
break
;
}
bol
=
buf
+
tags
[
level
].
size
;
if
(
bol
>
buf
&&
*
bol
==
' '
)
++
bol
;
if
(
pos
-
bol
>
0
)
{
#ifndef DEBUG
syslog
(
tags
[
level
].
priority
,
"%s"
,
bol
);
#else
printf
(
"%d/%s
\n
"
,
tags
[
level
].
priority
,
bol
);
#endif
}
pos
=
buf
;
colon
=
(
char
const
*
)
0
;
continue
;
}
if
(
c
==
':'
&&
!
colon
)
colon
=
pos
;
if
((
size_t
)
(
pos
-
buf
)
<
sizeof
(
buf
)
-
1
)
*
pos
++
=
c
;
}
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment