[jira] [Commented] (MINIFICPP-337) Make default log directory 'logs'

2018-01-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFICPP-337:
--

Github user asfgit closed the pull request at:

https://github.com/apache/nifi-minifi-cpp/pull/236


> 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
>Priority: Major
> Fix For: 0.4.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-337) Make default log directory 'logs'

2018-01-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFICPP-337:
--

Github user apiri commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/236
  
updates look good.   thanks will get this merged.  going to open another 
ticket to have a property that allow configuration of the location of the logs 
but this behavior will be have a little more as expected.


> 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
>Priority: Major
> Fix For: 0.4.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MINIFICPP-337) Make default log directory 'logs'

2018-01-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFICPP-337:
--

Github user minifirocks commented on the issue:

https://github.com/apache/nifi-minifi-cpp/pull/236
  
@apiri using MINIFI_HOME/logs. please review


> 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)


[jira] [Commented] (MINIFICPP-337) Make default log directory 'logs'

2018-01-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFICPP-337:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/236#discussion_r161296430
  
--- Diff: libminifi/src/core/logging/LoggerConfiguration.cpp ---
@@ -110,6 +112,17 @@ std::shared_ptr 
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(), ) != 0 || 
!S_ISDIR(logDirStat.st_mode)) {
+  if (mkdir(directory.c_str(), 0777) == -1) {
--- End diff --

so if you start bin/minifi.sh, the log directory will be ./logs where you 
start the same


> 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)


[jira] [Commented] (MINIFICPP-337) Make default log directory 'logs'

2018-01-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFICPP-337:
--

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

https://github.com/apache/nifi-minifi-cpp/pull/236#discussion_r161295854
  
--- Diff: libminifi/src/core/logging/LoggerConfiguration.cpp ---
@@ -110,6 +112,17 @@ std::shared_ptr 
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(), ) != 0 || 
!S_ISDIR(logDirStat.st_mode)) {
+  if (mkdir(directory.c_str(), 0777) == -1) {
--- End diff --

we read the directory variable from minifi-log.properties which specify the 
log name and log directory.
the directory can be a absolute path or relative path.



> 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)


[jira] [Commented] (MINIFICPP-337) Make default log directory 'logs'

2018-01-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFICPP-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 
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(), ) != 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)


[jira] [Commented] (MINIFICPP-337) Make default log directory 'logs'

2018-01-10 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFICPP-337:
--

GitHub user minifirocks opened a pull request:

https://github.com/apache/nifi-minifi-cpp/pull/236

MINIFICPP-337: make default log directory as logs

Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
 in the commit message?

- [ ] Does your PR title start with MINIFI- where  is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.

- [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?

- [ ] Is your initial contribution a single, squashed commit?

### For code changes:
- [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file?
- [ ] If applicable, have you updated the NOTICE file?

### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/minifirocks/nifi-minifi-cpp MINIFICPP-337

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi-minifi-cpp/pull/236.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #236


commit de8a48c8b15bdec4d5083af2088e5b308faf5ef7
Author: Bin Qiu 
Date:   2018-01-10T16:49:58Z

MINIFICPP-337: make default log directory as logs




> 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)