1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Option to disable logging

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

  1. XenialDan

    XenialDan Baby Zombie

    Messages:
    141
    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:
    774
    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 Fish

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

    XenialDan Baby Zombie

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

    XenialDan Baby Zombie

    Messages:
    141
    GitHub:
    thebigsmilexd
  6. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    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.
  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.