Skip to content

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

@Akanksha-kedia

Description

@Akanksha-kedia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions