Skip to content

Commit

Permalink
Merge pull request #8 from saradickinson/bugfix/fix_logging
Browse files Browse the repository at this point in the history
Bugfix/fix logging
  • Loading branch information
saradickinson authored Aug 24, 2017
2 parents ef9f0fe + 61024ce commit 499a82f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* 2017-08-24: Version 0.1.2
* revert logging to stderr until we have good separation of logging and error
within the code

* 2017-08-23: Version 0.1.1
* systemd folder has moved here from the getdns repo
* logging can now be controlled at runtime using the '-l' flag
* minor fixes from a static analysis

* 2017-07-12: Version 0.1.0
* Initial release of stubby after break-out from getdns repository
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Stubby provides DNS Privacy by:
* Using a default configuration which provides Strict Privacy and uses a subset
of the available [DNS Privacy servers](https://dnsprivacy.org/wiki/x/E4AT)

Stubby is developed by the getdns team.

# Documentation

<!---
Expand Down Expand Up @@ -104,7 +106,7 @@ Simply invoke Stubby on the command line. By default it runs in the foreground,
> sudo stubby
```

* Enable connection logging by using the '-l' flag. The logging is currently simplistic and simply writes to stdout. (We are working on making this better!)
* Enable connection logging by using the `-l` flag. The logging is currently simplistic and simply writes to stdout. (We are working on making this better!)
* The pid file is /var/run/stubby.pid

# Test Stubby
Expand Down Expand Up @@ -169,6 +171,9 @@ Or via the GUI:

# Building getdns from Source

Note that from getdns 1.1.3 stubby is included in the getdns code as a git submodule. Therefore stubby and getdns can be built together by following the
instructions below but adding the ``--with-stubby`` flag to the `configure` step.

## Dependencies

The most limited install of getdns that will work with Stubby requires only OpenSSL as a dependancy (version 1.0.2 or later is required for hostname authentication to be supported). If OpenSSL is installed in a non-standard location on your system use the `--with-ssl` option to `configure` below to specify where it is installed.
Expand Down Expand Up @@ -205,7 +210,7 @@ Note that on Mac OS X you will need the developer tools from Xcode to compile th
> autoreconf -fi
> mkdir build
> cd build
> ../configure --prefix=<install_location> --without-libidn --enable-stub-only --enable-debug-daemon
> ../configure --prefix=<install_location> --without-libidn --enable-stub-only
> make
> sudo make install
```
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_PREREQ([2.68])
AC_INIT([Stubby], [0.1.1], [[email protected]])
AC_INIT([Stubby], [0.1.2], [[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/stubby.c])
AC_CONFIG_HEADERS([config.h])
Expand Down
5 changes: 2 additions & 3 deletions src/stubby.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ static const char *default_config =
", listen_addresses: [ 127.0.0.1@53, 0::1@53 ]"
", tls_query_padding_blocksize: 256"
", edns_client_subnet_private : 1"
", idle_timeout: 10000"
", round_robin_upstreams: 1"
"}";

Expand Down Expand Up @@ -563,8 +562,8 @@ static void stubby_log(void *userarg, uint64_t system,
#endif
strftime(buf, 10, "%H:%M:%S", &tm);
(void)userarg; (void)system; (void)level;
(void) fprintf(stdout, "[%s.%.6d] STUBBY: ", buf, (int)tv.tv_usec);
(void) vfprintf(stdout, fmt, ap);
(void) fprintf(stderr, "[%s.%.6d] STUBBY: ", buf, (int)tv.tv_usec);
(void) vfprintf(stderr, fmt, ap);
}

void stubby_local_log(void *userarg, uint64_t system,
Expand Down

0 comments on commit 499a82f

Please sign in to comment.