Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
3bf24d0d
Commit
3bf24d0d
authored
Jan 24, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Configuration): rename initDebug() ==> initLogStream()
parent
678ebcd6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
18 deletions
+18
-18
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+2
-2
skel-main.cc
Utilities/codegen/skel-main.cc
+0
-2
Extensions.cc
extensions/lib/Extensions.cc
+3
-1
Configuration.h
include/Configuration.h
+3
-3
ModbusClient.cc
src/Communications/Modbus/ModbusClient.cc
+1
-1
ModbusServer.cc
src/Communications/Modbus/ModbusServer.cc
+1
-1
Configuration.cc
src/Various/Configuration.cc
+8
-8
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
3bf24d0d
...
@@ -633,7 +633,7 @@ end_private(false)
...
@@ -633,7 +633,7 @@ end_private(false)
{
{
ostringstream s;
ostringstream s;
s
<<
myname
<<
"-log";
s
<<
myname
<<
"-log";
conf->init
Debug
(mylog,s.str());
conf->init
LogStream
(mylog,s.str());
}
}
<xsl:for-each
select=
"//smap/item"
>
<xsl:for-each
select=
"//smap/item"
>
...
@@ -963,7 +963,7 @@ askPause(uniset_conf()->getPIntProp(cnode,"askPause",2000))
...
@@ -963,7 +963,7 @@ askPause(uniset_conf()->getPIntProp(cnode,"askPause",2000))
{
{
ostringstream s;
ostringstream s;
s
<<
myname
<<
"-log";
s
<<
myname
<<
"-log";
conf->init
Debug
(mylog, s.str());
conf->init
LogStream
(mylog, s.str());
}
}
si.node = conf->getLocalNode();
si.node = conf->getLocalNode();
...
...
Utilities/codegen/skel-main.cc
View file @
3bf24d0d
...
@@ -13,9 +13,7 @@ int main( int argc, const char **argv )
...
@@ -13,9 +13,7 @@ int main( int argc, const char **argv )
string
logfilename
=
conf
->
getArgParam
(
"--logfile"
,
"Skel.log"
);
string
logfilename
=
conf
->
getArgParam
(
"--logfile"
,
"Skel.log"
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
// dlog.logFile( logname.c_str() );
ulog
.
logFile
(
logname
.
c_str
()
);
ulog
.
logFile
(
logname
.
c_str
()
);
// conf->initDebug(dlog,"dlog");
auto
act
=
UniSetActivator
::
Instance
();
auto
act
=
UniSetActivator
::
Instance
();
xmlNode
*
cnode
=
conf
->
getNode
(
"Skel"
);
xmlNode
*
cnode
=
conf
->
getNode
(
"Skel"
);
...
...
extensions/lib/Extensions.cc
View file @
3bf24d0d
...
@@ -18,9 +18,11 @@ namespace UniSetExtensions
...
@@ -18,9 +18,11 @@ namespace UniSetExtensions
_dlog
=
make_shared
<
DebugStream
>
();
_dlog
=
make_shared
<
DebugStream
>
();
_dlog
->
setLogName
(
"dlog"
);
auto
conf
=
uniset_conf
();
auto
conf
=
uniset_conf
();
if
(
conf
)
if
(
conf
)
conf
->
init
Debug
(
_dlog
,
"dlog"
);
conf
->
init
LogStream
(
_dlog
,
"dlog"
);
return
_dlog
;
return
_dlog
;
}
}
...
...
include/Configuration.h
View file @
3bf24d0d
...
@@ -141,9 +141,9 @@ namespace UniSetTypes
...
@@ -141,9 +141,9 @@ namespace UniSetTypes
int
getArgPInt
(
const
std
::
string
&
name
,
int
defval
);
int
getArgPInt
(
const
std
::
string
&
name
,
int
defval
);
int
getArgPInt
(
const
std
::
string
&
name
,
const
std
::
string
&
strdefval
,
int
defval
);
int
getArgPInt
(
const
std
::
string
&
name
,
const
std
::
string
&
strdefval
,
int
defval
);
xmlNode
*
init
Debug
(
DebugStream
&
deb
,
const
std
::
string
&
nodename
);
xmlNode
*
init
LogStream
(
DebugStream
&
deb
,
const
std
::
string
&
nodename
);
xmlNode
*
init
Debug
(
std
::
shared_ptr
<
DebugStream
>
deb
,
const
std
::
string
&
nodename
);
xmlNode
*
init
LogStream
(
std
::
shared_ptr
<
DebugStream
>
deb
,
const
std
::
string
&
nodename
);
xmlNode
*
init
Debug
(
DebugStream
*
deb
,
const
std
::
string
&
nodename
);
xmlNode
*
init
LogStream
(
DebugStream
*
deb
,
const
std
::
string
&
nodename
);
UniSetTypes
::
ListOfNode
::
const_iterator
listNodesBegin
()
UniSetTypes
::
ListOfNode
::
const_iterator
listNodesBegin
()
{
{
...
...
src/Communications/Modbus/ModbusClient.cc
View file @
3bf24d0d
...
@@ -1261,7 +1261,7 @@ mbErrCode ModbusClient::send( ModbusMessage& msg )
...
@@ -1261,7 +1261,7 @@ mbErrCode ModbusClient::send( ModbusMessage& msg )
void
ModbusClient
::
initLog
(
UniSetTypes
::
Configuration
*
conf
,
void
ModbusClient
::
initLog
(
UniSetTypes
::
Configuration
*
conf
,
const
std
::
string
&
lname
,
const
string
&
logfile
)
const
std
::
string
&
lname
,
const
string
&
logfile
)
{
{
conf
->
init
Debug
(
dlog
,
lname
);
conf
->
init
LogStream
(
dlog
,
lname
);
if
(
!
logfile
.
empty
()
)
if
(
!
logfile
.
empty
()
)
dlog
->
logFile
(
logfile
);
dlog
->
logFile
(
logfile
);
...
...
src/Communications/Modbus/ModbusServer.cc
View file @
3bf24d0d
...
@@ -1385,7 +1385,7 @@ void ModbusServer::setLog( std::shared_ptr<DebugStream> l )
...
@@ -1385,7 +1385,7 @@ void ModbusServer::setLog( std::shared_ptr<DebugStream> l )
void
ModbusServer
::
initLog
(
UniSetTypes
::
Configuration
*
conf
,
void
ModbusServer
::
initLog
(
UniSetTypes
::
Configuration
*
conf
,
const
std
::
string
&
lname
,
const
string
&
logfile
)
const
std
::
string
&
lname
,
const
string
&
logfile
)
{
{
conf
->
init
Debug
(
dlog
,
lname
);
conf
->
init
LogStream
(
dlog
,
lname
);
if
(
!
logfile
.
empty
()
)
if
(
!
logfile
.
empty
()
)
dlog
->
logFile
(
logfile
);
dlog
->
logFile
(
logfile
);
...
...
src/Various/Configuration.cc
View file @
3bf24d0d
...
@@ -266,7 +266,7 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
...
@@ -266,7 +266,7 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
}
}
// Настраиваем отладочные логи
// Настраиваем отладочные логи
init
Debug
(
ulog
(),
"UniSetDebug"
);
init
LogStream
(
ulog
(),
"UniSetDebug"
);
// default init...
// default init...
transientIOR
=
false
;
transientIOR
=
false
;
...
@@ -729,27 +729,27 @@ string Configuration::getPropByNodeName(const string& nodename, const string& pr
...
@@ -729,27 +729,27 @@ string Configuration::getPropByNodeName(const string& nodename, const string& pr
return
getProp
(
node
,
prop
);
return
getProp
(
node
,
prop
);
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
xmlNode
*
Configuration
::
init
Debug
(
std
::
shared_ptr
<
DebugStream
>
deb
,
const
string
&
_debname
)
xmlNode
*
Configuration
::
init
LogStream
(
std
::
shared_ptr
<
DebugStream
>
deb
,
const
string
&
_debname
)
{
{
if
(
!
deb
)
if
(
!
deb
)
return
NULL
;
return
NULL
;
return
init
Debug
(
deb
.
get
(),
_debname
);
return
init
LogStream
(
deb
.
get
(),
_debname
);
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
xmlNode
*
Configuration
::
init
Debug
(
DebugStream
&
deb
,
const
string
&
_debname
)
xmlNode
*
Configuration
::
init
LogStream
(
DebugStream
&
deb
,
const
string
&
_debname
)
{
{
return
init
Debug
(
&
deb
,
_debname
);
return
init
LogStream
(
&
deb
,
_debname
);
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
xmlNode
*
Configuration
::
init
Debug
(
DebugStream
*
deb
,
const
string
&
_debname
)
xmlNode
*
Configuration
::
init
LogStream
(
DebugStream
*
deb
,
const
string
&
_debname
)
{
{
if
(
!
deb
)
if
(
!
deb
)
return
NULL
;
return
NULL
;
if
(
_debname
.
empty
()
)
if
(
_debname
.
empty
()
)
{
{
deb
->
any
()
<<
"(Configuration)(init
Debug
): INIT DEBUG FAILED!!!"
<<
endl
;
deb
->
any
()
<<
"(Configuration)(init
LogStream
): INIT DEBUG FAILED!!!"
<<
endl
;
return
0
;
return
0
;
}
}
...
@@ -758,7 +758,7 @@ xmlNode* Configuration::initDebug( DebugStream* deb, const string& _debname )
...
@@ -758,7 +758,7 @@ xmlNode* Configuration::initDebug( DebugStream* deb, const string& _debname )
xmlNode
*
dnode
=
getNode
(
_debname
);
xmlNode
*
dnode
=
getNode
(
_debname
);
if
(
dnode
==
NULL
)
if
(
dnode
==
NULL
)
deb
->
any
()
<<
"(Configuration)(init
Debug
): WARNING! Not found conf. section for log '"
<<
_debname
<<
"'"
<<
endl
;
deb
->
any
()
<<
"(Configuration)(init
LogStream
): WARNING! Not found conf. section for log '"
<<
_debname
<<
"'"
<<
endl
;
else
else
{
{
if
(
!
getProp
(
dnode
,
"name"
).
empty
()
)
if
(
!
getProp
(
dnode
,
"name"
).
empty
()
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment