Skip to content

Instantly share code, notes, and snippets.

@jobelenus
Last active December 28, 2015 21:59
Show Gist options
  • Save jobelenus/7568669 to your computer and use it in GitHub Desktop.
Save jobelenus/7568669 to your computer and use it in GitHub Desktop.
I don't get an exception from doing this... nor do I see the log file on the db server (which has facilities.conf set up)
import loghog, logging
LOGHOG_APP_NAME = 'lenspro-dev'
LOGHOG_HOST = '192.168.3.10'
LOGHOG_PORT = '5577'
LOGHOG_SSL = {
'pemfile': '/etc/loghogd/certs/lp-demo-web.pem',
'cacert': '/etc/loghogd/certs/lp-demo-db0-ca.cert'
}
h = loghog.LoghogHandler(LOGHOG_APP_NAME, host=LOGHOG_HOST, ssl_info=LOGHOG_SSL, port=LOGHOG_PORT, print_debug=True)
r = logging.LogRecord('foo', logging.WARN, '/', 'TESTING', None, None, None)
h.emit(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment