Option to disable logging

Discussion in 'Contributing & RFCs' started by XenialDan, Oct 4, 2018.

  1. XenialDan

    XenialDan Baby Zombie

    Messages:
    121
    GitHub:
    thebigsmilexd
    It would be great to add an option to disable logging in pmmp, just like i remember it from java servers.

    Reasons to do this:
    • The user might have limited space on his server, for example on paid vhost
    • Log files are unnecessary for the user as the server does not throw any error / relevant information
    • Log files are getting too big to handle when being opened via external programs
     
    Last edited: Oct 6, 2018
  2. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    624
    GitHub:
    dktapps
    This is something that I've been dicing with the thought of for a while. It looks easier than it really is due to some circular dependencies between Config and Server. These aren't solvable without breakages to the API.

    Right now (for a 3.x line) the only practical way to do this would be to add some kind of CLI option such as --disable-logging or similar.

    As for log files getting too big, I think log rotation would be a better solution for this problem. Log files compress well.
     
    jasonwynn10 and XenialDan like this.
  3. HimbeersaftLP

    HimbeersaftLP Wither Skeleton

    Messages:
    1,414
    GitHub:
    HimbeersaftLP
    Why would someone host a server on a video tape? I'm sorry. Pls don't ban me.
     
    Edwardthedog2, XenialDan and dktapps like this.
  4. XenialDan

    XenialDan Baby Zombie

    Messages:
    121
    GitHub:
    thebigsmilexd
    Whoops, autocorrect changed vhost to vhs :tears_of_joy:
     
    HimbeersaftLP likes this.
  5. XenialDan

    XenialDan Baby Zombie

    Messages:
    121
    GitHub:
    thebigsmilexd
  6. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin Noobiest member in the PMMP Team

    Messages:
    1,702
    GitHub:
    sof3
    Coupling.
    MainLogger should not have dependency on the Server to prevent mutual dependency between different modules. The settings to MainLogger should be passed in the MainLogger constructor. However, MainLogger was constructed in PocketMine.php, which is before server settings are loaded.
     
    Awzaw likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.