Skip to main content

modify format of msg to log center of ys.

Project description

####1、 变更记录 v0.0.8

  1. 增加consumer_tag 功能, 以便在rabit web 页面显示消费者
  2. 增加发送日志至日志中心功能
from ys_service import *


@ys_host.register("YS.机票.国内.退票.wiken.DEBUG", prefetch=1, consumer_tag="wiken")
def refund(context):
    print("bigin:", context.text)
    re = context.send_log_to_center(
        context=context,
        project="wikenTest",
        module="test1",
        user="7921",
        level="error",
        return_msg="log_center_test",
        field1="111111",
        field2="自愿",
        field3="国内",
    )

    print("result:", re)
    context.ack()    


with ys_host:
    ys_host.start()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_host-0.0.8.tar.gz (20.2 kB view hashes)

Uploaded Source

Built Distribution

py_host-0.0.8-py3-none-any.whl (37.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page