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.

Files for py-host, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size py_host-0.0.8-py3-none-any.whl (37.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size py_host-0.0.8.tar.gz (20.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page