Skip to content

Log rotation #133

Closed
Closed

Description

@Southclaws
  • logging to a file should be able to be disabled entirely
  • logging to a file enabled by default for quick start and simple use-cases
  • always write to stdout (not stderr - keeps it simple)
  • when enabled, there should be basic log rotation based on day

logs/2021-08-16.log

Activity

  1. Cheaterman commented on Aug 16, 2021

    @Cheaterman
    Contributor

    And/or send a signal to trigger log rotation externally, eg if using logrotate ?

  2. Southclaws commented on Aug 16, 2021

    @Southclaws
    CollaboratorAuthor

    Maybe, though I think if people are doing that they're already advanced users that might be using a proper log solution. Plus it's not the same cross-platform (Windows uses the COM message queue API, Linux uses process signals)

    It's not an existing sa-mp thing so I vote we keep it simple and just go for the bare minimum, and if someone asks for it down the line we can add it. (or better yet, they can add it!)

  3. Cheaterman commented on Aug 16, 2021

    @Cheaterman
    Contributor

    Sounds fair :-)

  4. AmyrAhmady commented on Jun 11, 2023

    @AmyrAhmady
    Member

    Available in next build

    Not gonna add date-based logging by default. (because many hosting services and software/tools parse logs and make data out of it using the timestamp printed/written out)

    But being able to specify a file now works, and it can be changed on the fly and calling reloadlog rcon cmd

    So now a script can rename/change log path config option at runtime and then use reloadlog cmd, all programmatically, to their desired way of logging (daily, weekly, monthly, or etc)

    The rest of requested enhancements have already been done in previous changes/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions