Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can make the ratelimit log print to a file? #579

Closed
ningyougang opened this issue May 11, 2024 · 2 comments
Closed

Can make the ratelimit log print to a file? #579

ningyougang opened this issue May 11, 2024 · 2 comments
Labels

Comments

@ningyougang
Copy link

  • Can make the ratelimit log output to a file?

    Currently, as for as i know, the ratelimit's log just print to standard output, can we make the log print to a file(e.g. /var/log/ratelimit.log)?

  • Can change the log filed?

    As for as know, there has several environments to control the LOG, e.g

    env:
    - name: LOG_FORMAT
       value: text|json
    - name: LOG_LEVEL
       value: info|warn
    

    if configure with LOG_FORMAT: text, the log's content as below

    time="2020-09-10T17:22:35Z" level=debug msg="loading domain: messaging"
    time="2020-09-10T17:22:35Z" level=debug msg="loading descriptor: key=messaging.message_type_marketing"
    time="2020-09-10T17:22:35Z" level=debug msg="loading descriptor: key=messaging.message_type_marketing.to_number ratelimit={requests_per_unit=5, unit=DAY}"
    time="2020-09-10T17:22:35Z" level=debug msg="loading descriptor: key=messaging.to_number ratelimit={requests_per_unit=100, unit=DAY}"
    time="2020-09-10T17:21:55Z" level=warning msg="Listening for debug on ':6070'"
    time="2020-09-10T17:21:55Z" level=warning msg="Listening for HTTP on ':8080'"
    time="2020-09-10T17:21:55Z" level=debug msg="waiting for runtime update"
    time="2020-09-10T17:21:55Z" level=warning msg="Listening for gRPC on ':8081'"
    

    can we make above log content as below?

    2020-09-10T17:22:35Z debug loading domain: messaging
    2020-09-10T17:22:35Z debug loading descriptor: key=messaging.message_type_marketing
    2020-09-10T17:22:35Z debug loading descriptor: key=messaging.message_type_marketing.to_number ratelimit={requests_per_unit=5, unit=DAY}
    2020-09-10T17:22:35Z debug loading descriptor: key=messaging.to_number ratelimit={requests_per_unit=100, unit=DAY}
    2020-09-10T17:21:55Z warning Listening for debug on ':6070'
    2020-09-10T17:21:55Z warning Listening for HTTP on ':8080'
    2020-09-10T17:21:55Z debug waiting for runtime update
    2020-09-10T17:21:55Z warning Listening for gRPC on ':8081'
    
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 10, 2024
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant