The Wayback Machine - https://web.archive.org/web/20201027055952/https://github.com/log4cplus/log4cplus/pull/200
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

Added environment variable resolution to the include directive in a config file #200

Open
wants to merge 2 commits into
base: master
from

Conversation

@billh-apcon-com
Copy link

@billh-apcon-com billh-apcon-com commented Oct 6, 2016

Added environment variable resolution to the include directive in a config file

billh-apcon-com added 2 commits Oct 5, 2016
@@ -138,7 +138,11 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Unicode|Win32'">
<Link>
<AdditionalDependencies>Qt5Cored.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\Qt\5.6.0\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

This comment has been minimized.

@wilx

wilx Oct 6, 2016
Contributor

Do not add the changes to the Visual Studio project files to the pull request.

@@ -140,6 +140,7 @@ namespace log4cplus {

// Methods
void init(log4cplus::tistream& input);
bool substitueEnvVariables(tstring &fileName, tstring &modFileName);

This comment has been minimized.

@wilx

wilx Oct 6, 2016
Contributor

Please remote all tabs from the source.

@@ -786,7 +768,6 @@ Global
{7EFABA06-71CD-498F-BF10-C41A7D2DCF3B} = {92DEA81D-81ED-4283-BBC7-41975647F69E}
{AE4CF05D-9770-4BF2-BB73-1DA37E2A1508} = {92DEA81D-81ED-4283-BBC7-41975647F69E}
{C0C6F651-99D8-404E-B2EC-507B261E820C} = {DAFB5F7D-6AF3-4D4F-B6D3-C1049A1259DA}
{18B64AA1-A2F7-46BE-8D48-7882AA471FA9} = {DAFB5F7D-6AF3-4D4F-B6D3-C1049A1259DA}

This comment has been minimized.

@wilx

wilx Oct 6, 2016
Contributor

Do not add the changes to the Visual Studio project files to the pull request.

{
tstring included (buffer, 8) ;
trim_ws (included);
else if (buffer.compare(0, 7, LOG4CPLUS_TEXT("include")) == 0

This comment has been minimized.

@wilx

wilx Oct 6, 2016
Contributor

Remove tabs.


init (file);
}
}
}

bool
Properties::substitueEnvVariables(tstring &fileName, tstring &modFileName)

This comment has been minimized.

@wilx

wilx Oct 6, 2016
Contributor

I am not sure that we need a new function for this. There is already a function substVars() in configurator.cxx. It seems it should be used here as well. If so, you can probably move it from anonymous namespace into internal namespace and make it visible to the property.cxx and use it there.

@wilx wilx self-assigned this Oct 6, 2016
@wilx wilx added the enhancement label Oct 6, 2016
@billh-apcon-com
Copy link
Author

@billh-apcon-com billh-apcon-com commented Oct 7, 2016

Sorry about the changes in the visual studio projects. I’m new to Git, and it’s a little different from other CMS packages.

I’ll look into your suggestion about substVars()

substVars (tstring & dest, const tstring & val,
.

For now, just reject the pull request.

Regards,
William Hayden
Apcon, Inc

From: Václav Haisman [mailto:[email protected]]
Sent: Thursday, October 06, 2016 3:55 PM
To: log4cplus/log4cplus [email protected]
Cc: Bill Hayden [email protected]; Author [email protected]
Subject: Re: [log4cplus/log4cplus] Added environment variable resolution to the include directive in a config file (#200)

@wilx requested changes on this pull request.


In msvc14/Qt5DebugAppender.vcxprojhttps://github.com//pull/200#pullrequestreview-3201271:

@@ -138,7 +138,11 @@

 <Link>

   <AdditionalDependencies>Qt5Cored.lib;%(AdditionalDependencies)</AdditionalDependencies>
  •  <AdditionalLibraryDirectories>C:\Qt\5.6.0\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    

Do not add the changes to the Visual Studio project files to the pull request.


In include/log4cplus/helpers/property.hhttps://github.com//pull/200#pullrequestreview-3201271:

@@ -140,6 +140,7 @@ namespace log4cplus {

       // Methods

         void init(log4cplus::tistream& input);
  •                  bool substitueEnvVariables(tstring &fileName, tstring &modFileName);
    

Please remote all tabs from the source.


In msvc14/log4cplus.slnhttps://github.com//pull/200#pullrequestreview-3201271:

@@ -786,7 +768,6 @@ Global

           {7EFABA06-71CD-498F-BF10-C41A7D2DCF3B} = {92DEA81D-81ED-4283-BBC7-41975647F69E}

           {AE4CF05D-9770-4BF2-BB73-1DA37E2A1508} = {92DEA81D-81ED-4283-BBC7-41975647F69E}

           {C0C6F651-99D8-404E-B2EC-507B261E820C} = {DAFB5F7D-6AF3-4D4F-B6D3-C1049A1259DA}
  •          {18B64AA1-A2F7-46BE-8D48-7882AA471FA9} = {DAFB5F7D-6AF3-4D4F-B6D3-C1049A1259DA}
    

Do not add the changes to the Visual Studio project files to the pull request.


In src/property.cxxhttps://github.com//pull/200#pullrequestreview-3201271:

@@ -256,27 +256,53 @@ Properties::init(tistream& input)

         trim_ws (value);

         setProperty(key, value);

     }
  •    else if (buffer.compare (0, 7, LOG4CPLUS_TEXT ("include")) == 0
    
  •        && buffer.size () >= 7 + 1 + 1
    
  •        && is_space (buffer[7]))
    
  •    {
    
  •        tstring included (buffer, 8) ;
    
  •        trim_ws (included);
    
  •          else if (buffer.compare(0, 7, LOG4CPLUS_TEXT("include")) == 0
    

Remove tabs.


In src/property.cxxhttps://github.com//pull/200#pullrequestreview-3201271:

         init (file);

     }

 }

}

+bool

+Properties::substitueEnvVariables(tstring &fileName, tstring &modFileName)

I am not sure that we need a new function for this. There is already a function substVars()

substVars (tstring & dest, const tstring & val,
in configurator.cxx. It seems it should be used here as well. If so, you can probably move it from anonymous namespace into internal namespace and make it visible to the property.cxx and use it there.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//pull/200#pullrequestreview-3201271, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVmKVf4EqvutvGeDG3KU1CmMe7_ml-T_ks5qxWArgaJpZM4KP7P4.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.