File python-python-logging-rabbitmq.spec of Package python-python-logging-rabbitmq

#
# spec file for package python-python-logging-rabbitmq
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define mod_name python-logging-rabbitmq

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-%{mod_name}
Version:        1.0.7
Release:        0
Summary:        Logging handler to ship logs to RabbitMQ
License:        MIT
Group:          Development/Languages/Python
Url:            https://github.com/albertomr86/python-logging-rabbitmq
Source:         https://files.pythonhosted.org/packages/source/p/%{mod_name}/%{mod_name}-%{version}.tar.gz
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-pika
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%python_subpackages

%description
Logging handler to ship logs to RabbitMQ. This package has two built-in
handlers: RabbitMQHandler and RabbitMQHandlerOneWay.

RabbitMQHandler is the basic handler for sending logs to RabbitMQ. Every
record will be delivered directly to RabbitMQ using the exchange configured.

RabbitMQHandlerOneWay is a high throughput handler. Initializes an internal
queue where logs are stored temporarily. A thread is used to deliver the logs
to RabbitMQ using the exchange configured. Your app doesn't need to wait until
the log is delivered. Notice that if the main thread dies you might lose logs.

%prep
%setup -q -n %{mod_name}-%{version}

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}/python_logging_rabbitmq
%python_expand %fdupes %{buildroot}%{$python_sitelib}/*.egg-info

%files %{python_files}
%defattr(-,root,root, -)
%doc LICENSE.txt README.md
%python_sitelib/python_logging_rabbitmq*

%changelog

openSUSE Build Service is sponsored by