Skip to content

Commit

Permalink
Add additional log properties using config-properties file
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaho12 authored and mosabua committed May 31, 2024
1 parent 5315748 commit 57532ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
11 changes: 6 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,15 @@ configuration YAML file.

Find more information in the [routing rules documentation](routing-rules.md).


### Configure logging <a name="logging">

Path to `log.properties` must be set via `log.levels-file` JVM options
like `-Dlog.levels-file=etc/log.properties`.
To configure the logging level for various classes, specify the path to the
`log.properties` file using the `log.levels-file` JVM options, such as
`-Dlog.levels-file=etc/log.properties`, when the logging type is `external`.

Use the `log.*` properties from the [Trino logging properties
documentation](https://trino.io/docs/current/admin/properties-logging.html) for further configuration.
For additional configurations, use the `log.*` properties from the
[Trino logging properties documentation](https://trino.io/docs/current/admin/properties-logging.html) and specify the path to `config.properties`
file using the `config` JVM options, such as `-Dconfig=var/config.properties`.

### Proxying additional paths

Expand Down
4 changes: 4 additions & 0 deletions gateway-ha/etc/config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
% https://trino.io/docs/current/admin/properties-logging.html
log.max-size=100MB
log.max-total-size=1GB
log.compression=GZIP
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import java.util.Map;

import static io.airlift.configuration.ConfigurationLoader.getSystemProperties;
import static io.airlift.configuration.ConfigurationLoader.loadProperties;

public class HaGatewayLauncher
extends BaseApp
Expand All @@ -40,7 +40,7 @@ public static void main(String[] args)
throws Exception
{
Logging.initialize();
Map<String, String> properties = getSystemProperties();
Map<String, String> properties = loadProperties();
ConfigurationFactory configurationFactory = new ConfigurationFactory(properties);
LoggingConfiguration configuration = configurationFactory.build(LoggingConfiguration.class);
Logging logging = Logging.initialize();
Expand Down

0 comments on commit 57532ca

Please sign in to comment.