[ 
https://issues.apache.org/jira/browse/MINIFICPP-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16322626#comment-16322626
 ] 

ASF GitHub Bot commented on MINIFICPP-337:
------------------------------------------

Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/236#discussion_r161024930
  
    --- Diff: libminifi/src/core/logging/LoggerConfiguration.cpp ---
    @@ -110,6 +112,17 @@ std::shared_ptr<internal::LoggerNamespace> 
LoggerConfiguration::initialize_names
           if (!logger_properties->get(appender_key + ".file_name", file_name)) 
{
             file_name = "minifi-app.log";
           }
    +      std::string directory = "";
    +      if (logger_properties->get(appender_key + ".directory", directory)) {
    +        // Create the log directory if needed
    +        struct stat logDirStat;
    +        if (stat(directory.c_str(), &logDirStat) != 0 || 
!S_ISDIR(logDirStat.st_mode)) {
    +          if (mkdir(directory.c_str(), 0777) == -1) {
    --- End diff --
    
    How directory is handled here will not make this within the root of the 
minifi deployment and will be relative to where the call is invoked from.  So 
if I perform a minifi.sh start, it will do so from the logs directory of where 
I started and not within my minifi installation.


> Make default log directory 'logs'
> ---------------------------------
>
>                 Key: MINIFICPP-337
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-337
>             Project: NiFi MiNiFi C++
>          Issue Type: Bug
>            Reporter: marco polo
>            Assignee: bqiu
>             Fix For: 0.4.0
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to