File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -126,15 +126,18 @@ BOOL COCSInventoryApp::InitInstance()
126
126
BOOL bWriteState = FALSE ;
127
127
CString csLabelText;
128
128
129
+ // Agent Configuration
130
+ m_pConfig = getAgentConfig ();
131
+
132
+ // Parse command line before instanciate logger
133
+ BOOL bParseCommandLine = parseCommandLine ();
134
+
129
135
// Logger
130
136
m_pLogger = getOcsLogger ();
131
137
m_pLogger->setApplication ( AfxGetAppName ());
132
138
m_pLogger->log ( LOG_PRIORITY_NOTICE, _T ( " ==============================================================================" ));
133
139
m_pLogger->log ( LOG_PRIORITY_NOTICE, _T ( " Starting OCS Inventory Agent on %s." ), cStartTime.Format ( _T ( " %#c" )));
134
140
135
- // Agent Configuration
136
- m_pConfig = getAgentConfig ();
137
-
138
141
// Communication provider loader
139
142
CComProvider *pProvider = getComServerProvider ();
140
143
CServerConfig *pServerConfig = NULL ;
@@ -164,7 +167,7 @@ BOOL COCSInventoryApp::InitInstance()
164
167
* Parse command line
165
168
*
166
169
****/
167
- if (!parseCommandLine () )
170
+ if (!bParseCommandLine )
168
171
{
169
172
m_pLogger->log (LOG_PRIORITY_ERROR, _T ( " AGENT => Failed initializing using provided command line parameters <%s>" ), m_lpCmdLine);
170
173
m_nExitCode = OCS_APP_GENERIC_ERROR;
You can’t perform that action at this time.
0 commit comments