zncdatadev / hive-operator

Operator for Apache Hive
Apache License 2.0
5 stars 5 forks source link

Code of overriding log4j properties miss a dot #45

Closed lwpk110 closed 6 months ago

lwpk110 commented 7 months ago

What happened: the code in package controller ,and logging,go file, metastoreLog4j method,the code below miss a dot:

func (r *MetastoreLoggingRecociler) metastoreLog4j(loggingConfig *hivev1alpha1.LoggingConfigSpec) string {
    properties := make(map[string]string)

    if loggingConfig.Loggers != nil {
        for k, level := range loggingConfig.Loggers {
            if level != nil {
                v := *level
                properties["logger."+k+"level"] = v.Level
            }
        }
    }

the bug row is properties["logger."+k+"level"] = v.Level , there is a dot(.) missing before the level word

What you expected to happen:

correct code should be properties["logger."+k+".level"] = v.Level

whg517 commented 7 months ago

@lwpk110 ok i will fix the follow code:

https://github.com/zncdata-labs/hive-operator/blob/cee7d4eafd53498334c836b34da0abcac982c2ed/internal/controller/logging.go#L206-L209

lwpk110 commented 6 months ago

closed by : https://github.com/zncdata-labs/hive-operator/pull/51