Possible to change log location ?

kayman
kayman New Altair Community Member
edited November 2024 in Community Q&A

Is it possible to move the location where logs are stored under Ubuntu? Currently these are stored on my main partition (../standalone/log) but since this isn't really big I want them to be stored on another partition. The log files tend to take up quite some space (just removed almost 30GB of logs because my system started to complain) and I want to be a bit more flexible / safe with respect to disc usage.

Or, are there other ways to keep logs under control, like only keeping a few days rather than for eternity or limiting the amount of data written away?

Tagged:

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member

    Hi,

     

    you can configure the logging system in the standalone.xml (found in the SERVER/standalone/configuration folder).

    Look for:

    <subsystem xmlns="urn:jboss:domain:logging:1.5">

    You can change the location here:

    <file relative-to="jboss.server.log.dir" path="server.log"/>

    Another alternative would be to create a symlink directory so that the standalone/log folder is replaced by the symlink, storing the logs on a different partition.

     

    Regards,

    Marco