Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict between 'log.output-file' and 'log.path' properties #70

Open
Akanksha-kedia opened this issue Feb 16, 2024 · 1 comment
Open

Comments

@Akanksha-kedia
Copy link

Akanksha-kedia commented Feb 16, 2024

Motivation: While configuring Presto, I encountered an issue where the 'log.output-file' property conflicts with the 'log.path' property. Both properties are trying to set the log file's location, but they're given different values.

Details: The error message I received was:

Error: Configuration property 'log.output-file' (=/Users/akanksha/Documents/PrestoRuntime/data/var/log/server.log) conflicts with property 'log.path' (=~/Downloads/server.log)

com.google.inject.ConfigurationException: Guice configuration errors:

  1. Error: Configuration property 'log.output-file' (=/Users/akanksha/Documents/PrestoRuntime/data/var/log/server.log) conflicts with property 'log.path' (=~/Downloads/server.log) but
    loggingConfiguration has :
    public String getLogPath()
    {
    return logPath;
    }
    The method setLogPath(String logPath) is annotated with both @LegacyConfig("log.output-file") and @config("log.path"). This means it can be configured with either 'log.output-file' or 'log.path'. However, it seems there should only be one of them in the configuration file, not both.

Proposed Solution: As 'log.output-file' is marked as a legacy configuration, it might be better to recommend using the 'log.path' property in the error message. Moreover, if 'log.output-file' is no longer recommended, it might be worth considering its deprecation or removal in future versions. 503 60108 1 0 5:55PM ?? 0:06.28 java -cp /opensourceoct/prestodb/target/presto-server-0.285-SNAPSHOT 2/lib/* -server -Xmx16G -XX:G1HeapRegionSize=32M -XX:+UseGCOverheadLimit -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError -Djava.io.tmpdir=/data/dir/ -Dnode.environment=production -Dnode.id=ffffffff-ffff-ffff-ffff-ffffffffffff -Dnode.data-dir=/data/dir/ -Dlog.levels-file=/opensourceoct/prestodb/target/presto-server-0.285-SNAPSHOT 2/etc/log.properties -Dlog.output-file=/Users/akanksha/Documents/PrestoRuntime/data/var/log/server.log -Dlog.enable-console=false -Dconfig=/Users/akanksha/opensourceoct/prestodb/target/presto-server-0.285-SNAPSHOT 2/etc/config.properties com.facebook.presto.server.PrestoServer

@Akanksha-kedia
Copy link
Author

@imjalpreet please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant