Skip to content

Commit

Permalink
v0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
yurial committed Jun 29, 2012
1 parent a2ae1bb commit 255aaad
Show file tree
Hide file tree
Showing 15 changed files with 91 additions and 35 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2012-06-29 Yuri Dyachenko <[email protected]>
Version 0.5 released
More examples in 'examples/'.
Fix README.

2012-06-28 Yuri Dyachenko <[email protected]>
Version 0.4 released
Now config.h not supported in header file.
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ libsyslogpp_r_a_SOURCES = src/syslogpp_r.cpp
library_includedir=$(includedir)/
library_include_HEADERS = src/syslogpp.h
man_MANS = man/libsyslogpp.7
EXTRA_DIST = ebuild $(man_MANS) src/example.cpp
EXTRA_DIST = ebuild $(man_MANS) examples

2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ libsyslogpp_r_a_SOURCES = src/syslogpp_r.cpp
library_includedir = $(includedir)/
library_include_HEADERS = src/syslogpp.h
man_MANS = man/libsyslogpp.7
EXTRA_DIST = ebuild $(man_MANS) src/example.cpp
EXTRA_DIST = ebuild $(man_MANS) examples
all: all-am

.SUFFIXES:
Expand Down
8 changes: 4 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ NAME
SYNOPSIS
#include <syslogpp.h>
Link with -lsyslogpp or with -lsyslogpp_r -pthread if you build library with multi-threading support.
libsyslogpp_r is a thread-safe library. Library provides a 'syslog' object for each thread. These messages don't mix up in output sequence, it is guaranteed.
libsyslogpp_r is a thread-safe library which provides a 'syslog' object for each thread. These messages with guarantee won't be mixed in proceeding sequence.

For including standard syslog mechanism define HAVE_SYSLOG_H keyword (else you should provide your owns syslog functions similar to openlog, closelog, syslog, setlogmask ).
For including standard syslog mechanism define HAVE_SYSLOG_H keyword (else you should provide yours syslog functions similar to openlog, closelog, syslog, setlogmask ).
SYSLOGPP_DEFAULT_PRIO define a default messages priority, if HAVE_SYSLOG_H defined set LOG_ALERT else 0.

class syslog_t:
Expand Down Expand Up @@ -52,7 +52,7 @@ STREAM INTERFACE
You can mix changing of messages priority and data redirection:
syslog( LOG_DEBUG ) << "test message" << std::endl;

The operator of priority modification transfers data from internal buffer to syslog with the previous priority before set a new priority value.
The operator of priority modification transfers data from internal buffer to syslog with the previous priority before setting a new priority value.
syslog( LOG_DEBUG ) << "message1";
syslog( LOG_NOTICE ) << "message2" << std::endl; //send "message1" with priority LOG_DEBUG and "message2" with priority LOG_NOTICE.

Expand All @@ -71,7 +71,7 @@ STREAM INTERFACE
return EXIT_SUCCESS;
}

The substitution of std::cerr isn't recommended, because it hasn't buffering and sends each message separately.
The substitution of std::cerr requires the inclusion of buffering. Use it with std::nounitbuf manipulator else std::cerr will send each message separately.

AUTHORS
Document written by:
Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for syslogpp 0.4.
# Generated by GNU Autoconf 2.68 for syslogpp 0.5.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Expand Down Expand Up @@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='syslogpp'
PACKAGE_TARNAME='syslogpp'
PACKAGE_VERSION='0.4'
PACKAGE_STRING='syslogpp 0.4'
PACKAGE_VERSION='0.5'
PACKAGE_STRING='syslogpp 0.5'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1299,7 +1299,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures syslogpp 0.4 to adapt to many kinds of systems.
\`configure' configures syslogpp 0.5 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1369,7 +1369,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of syslogpp 0.4:";;
short | recursive ) echo "Configuration of syslogpp 0.5:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1474,7 +1474,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
syslogpp configure 0.4
syslogpp configure 0.5
generated by GNU Autoconf 2.68

Copyright (C) 2010 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1960,7 +1960,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by syslogpp $as_me 0.4, which was
It was created by syslogpp $as_me 0.5, which was
generated by GNU Autoconf 2.68. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -2775,7 +2775,7 @@ fi

# Define the identity of the package.
PACKAGE=syslogpp
VERSION=0.4
VERSION=0.5


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -16071,7 +16071,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by syslogpp $as_me 0.4, which was
This file was extended by syslogpp $as_me 0.5, which was
generated by GNU Autoconf 2.68. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -16137,7 +16137,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
syslogpp config.status 0.4
syslogpp config.status 0.5
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_INIT([syslogpp],[0.4])
AM_INIT_AUTOMAKE([syslogpp],[0.4])
AC_INIT([syslogpp],[0.5])
AM_INIT_AUTOMAKE([syslogpp],[0.5])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/acx_pthread.m4])
: ${CXXFLAGS=""}
Expand Down
5 changes: 5 additions & 0 deletions ebuild/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2012-06-29 Yuri Dyachenko <[email protected]>
Version 0.5 released
More examples in 'examples/'.
Fix README.

2012-06-28 Yuri Dyachenko <[email protected]>
Version 0.4 released
Now config.h not supported in header file.
Expand Down
3 changes: 2 additions & 1 deletion ebuild/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ EBUILD libsyslogpp-0.1.ebuild 710 RMD160 dd8272621a0cb461a66d97bfd5ff28de026d466
EBUILD libsyslogpp-0.2.ebuild 710 RMD160 dd8272621a0cb461a66d97bfd5ff28de026d4667 SHA1 8bda5f4f2fd021e08d607e39ba55b7b831460b81 SHA256 2acec841c7ab96c85c12c6e864555328571a98089ccb16bc34302d100b90e8f8
EBUILD libsyslogpp-0.3.ebuild 679 RMD160 46f1f9a1d96a9e721aa0fa3e238789ffd84662e3 SHA1 e68ff52566cae6d0c4776be69c8b25b6f397a5f2 SHA256 fcc945c5cbd66c9702d32b484254b14f7f1accbfb84c91fa8fdfd9d3edef7f3a
EBUILD libsyslogpp-0.4.ebuild 679 RMD160 46f1f9a1d96a9e721aa0fa3e238789ffd84662e3 SHA1 e68ff52566cae6d0c4776be69c8b25b6f397a5f2 SHA256 fcc945c5cbd66c9702d32b484254b14f7f1accbfb84c91fa8fdfd9d3edef7f3a
EBUILD libsyslogpp-0.5.ebuild 679 RMD160 46f1f9a1d96a9e721aa0fa3e238789ffd84662e3 SHA1 e68ff52566cae6d0c4776be69c8b25b6f397a5f2 SHA256 fcc945c5cbd66c9702d32b484254b14f7f1accbfb84c91fa8fdfd9d3edef7f3a
EBUILD libsyslogpp-9999.ebuild 679 RMD160 46f1f9a1d96a9e721aa0fa3e238789ffd84662e3 SHA1 e68ff52566cae6d0c4776be69c8b25b6f397a5f2 SHA256 fcc945c5cbd66c9702d32b484254b14f7f1accbfb84c91fa8fdfd9d3edef7f3a
MISC ChangeLog 462 RMD160 dc03f8b910f98f83ca44050b114002d441f7479f SHA1 60aaf281afe3f31feb3dfa6172b57f98b584cc67 SHA256 5de78a8c981f62a76fefb14fddf12c86f13ddc1d48335a098618f2bcd9241cd8
MISC ChangeLog 573 RMD160 67bbfc19a70b171f38a3bd88c854db167ff0d415 SHA1 d718f197708e552b68b26de91577756d4ec2fa0a SHA256 2b8106be4cb0c528aa93c9760d951295b4e181d5a1defbc64f681612a858191f
1 change: 1 addition & 0 deletions ebuild/libsyslogpp-0.5.ebuild
9 changes: 9 additions & 0 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CXXFLAGS+=-DHAVE_SYSLOG_H
LDLIBS+=-lsyslogpp
all: cerr clog std stream
clean:
rm -f cerr clog std stream
cerr: cerr.cpp
clog: clog.cpp
std: std.cpp
stream: stream.cpp
15 changes: 15 additions & 0 deletions examples/cerr.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <stdlib.h>
#include <iostream>
#include <syslogpp.h>

int main(int argc, char* argv[])
{
syslog.open( NULL, LOG_PID, LOG_USER );
syslog( LOG_DEBUG );
std::cerr << std::nounitbuf; //Do not force flushes after insertions
std::cerr.rdbuf( syslog.rdbuf() );
std::cerr << "std::cerr stream interface" << std::endl;
syslog.close();
return EXIT_SUCCESS;
}

14 changes: 14 additions & 0 deletions examples/clog.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <stdlib.h>
#include <iostream>
#include <syslogpp.h>

int main(int argc, char* argv[])
{
syslog.open( NULL, LOG_PID, LOG_USER );
syslog( LOG_ERR );
std::clog.rdbuf( syslog.rdbuf() );
std::clog << "std::clog stream interface" << std::endl;
syslog.close();
return EXIT_SUCCESS;
}

11 changes: 11 additions & 0 deletions examples/std.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <stdlib.h>
#include <syslogpp.h>

int main(int argc, char* argv[])
{
openlog( NULL, LOG_PID, LOG_USER );
syslog( LOG_DEBUG, "%s", "standard interface" );
closelog();
return EXIT_SUCCESS;
}

11 changes: 11 additions & 0 deletions examples/stream.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <stdlib.h>
#include <syslogpp.h>

int main()
{
syslog.open( NULL, LOG_PID, LOG_USER );
syslog( LOG_DEBUG ) << "syslog stream interface" << std::endl;
syslog.close();
return EXIT_SUCCESS;
}

16 changes: 0 additions & 16 deletions src/example.cpp

This file was deleted.

0 comments on commit 255aaad

Please sign in to comment.