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
06161ca0
Commit
06161ca0
authored
Jan 24, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Убрал везде вызов conf->initDebug(dlog()).. т.к. он встроен в dlog().
И другие незначительные правки..
parent
51bb5408
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
24 additions
and
46 deletions
+24
-46
logserver.cc
Utilities/ULog/logserver.cc
+6
-5
skel-main.cc
Utilities/codegen/skel-main.cc
+4
-4
testgen.src.xml
Utilities/codegen/tests/testgen.src.xml
+1
-1
iocontrol.cc
extensions/IOControl/iocontrol.cc
+0
-1
logicproc.cc
extensions/LogicProcessor/logicproc.cc
+0
-2
plogicproc.cc
extensions/LogicProcessor/plogicproc.cc
+0
-2
main.cc
extensions/ModbusMaster/main.cc
+0
-2
multi-main.cc
extensions/ModbusMaster/multi-main.cc
+0
-2
rtuexchange.cc
extensions/ModbusMaster/rtuexchange.cc
+0
-2
run_test_mbtcpmaster.cc
extensions/ModbusMaster/tests/run_test_mbtcpmaster.cc
+0
-1
run_test_mbtcpmultimaster.cc
extensions/ModbusMaster/tests/run_test_mbtcpmultimaster.cc
+0
-1
test_mbtcpmaster.cc
extensions/ModbusMaster/tests/test_mbtcpmaster.cc
+1
-1
test_mbtcpmultimaster.cc
extensions/ModbusMaster/tests/test_mbtcpmultimaster.cc
+1
-1
mbslave.cc
extensions/ModbusSlave/mbslave.cc
+0
-2
mbtcp-multislave.cc
extensions/ModbusSlave/mbtcp-multislave.cc
+0
-2
tests_with_sm.cc
extensions/ModbusSlave/tests/tests_with_sm.cc
+0
-1
main.cc
extensions/RRDServer/main.cc
+0
-2
main.cc
extensions/SMDBServer/main.cc
+0
-2
smemory.cc
extensions/SharedMemory/smemory.cc
+0
-1
smemory-plus.cc
extensions/SharedMemoryPlus/smemory-plus.cc
+1
-1
tests_individual_process.cc
extensions/UNetUDP/tests/tests_individual_process.cc
+0
-1
tests_with_sm.cc
extensions/UNetUDP/tests/tests_with_sm.cc
+0
-1
unetexchange.cc
extensions/UNetUDP/unetexchange.cc
+0
-1
uninet.cc
extensions/UniNetwork/uninet.cc
+0
-1
Extensions.cc
extensions/lib/Extensions.cc
+6
-0
smemory-test.cc
extensions/tests/SMemoryTest/smemory-test.cc
+2
-3
Configuration.cc
src/Various/Configuration.cc
+2
-3
No files found.
Utilities/ULog/logserver.cc
View file @
06161ca0
...
@@ -81,15 +81,14 @@ int main( int argc, char **argv )
...
@@ -81,15 +81,14 @@ int main( int argc, char **argv )
// dlog.addLevel( Debug::type(Debug::CRIT | Debug::WARN | Debug::INFO) );
// dlog.addLevel( Debug::type(Debug::CRIT | Debug::WARN | Debug::INFO) );
}
}
LogAgregator
la
;
auto
dlog
=
make_shared
<
DebugStream
>
();
auto
dlog
=
make_shared
<
DebugStream
>
();
dlog
->
setLogName
(
"dlog"
);
dlog
->
setLogName
(
"dlog"
);
auto
dlog2
=
make_shared
<
DebugStream
>
();
dlog2
->
setLogName
(
"dlog2"
);
LogAgregator
la
;
la
.
add
(
dlog
);
la
.
add
(
dlog
);
la
.
add
(
dlog2
);
auto
dlog2
=
la
.
create
(
"dlog2"
);
LogServer
ls
(
la
);
LogServer
ls
(
la
);
// LogServer ls(cout);
// LogServer ls(cout);
...
@@ -97,6 +96,7 @@ int main( int argc, char **argv )
...
@@ -97,6 +96,7 @@ int main( int argc, char **argv )
dlog2
->
addLevel
(
Debug
::
ANY
);
dlog2
->
addLevel
(
Debug
::
ANY
);
ls
.
run
(
addr
,
port
,
true
);
ls
.
run
(
addr
,
port
,
true
);
#if 0
unsigned int i=0;
unsigned int i=0;
while( true )
while( true )
...
@@ -112,6 +112,7 @@ int main( int argc, char **argv )
...
@@ -112,6 +112,7 @@ int main( int argc, char **argv )
msleep(delay);
msleep(delay);
}
}
#endif
}
}
catch
(
SystemError
&
err
)
catch
(
SystemError
&
err
)
{
{
...
...
Utilities/codegen/skel-main.cc
View file @
06161ca0
...
@@ -31,10 +31,10 @@ int main( int argc, const char **argv )
...
@@ -31,10 +31,10 @@ int main( int argc, const char **argv )
SystemMessage
sm
(
SystemMessage
::
StartUp
);
SystemMessage
sm
(
SystemMessage
::
StartUp
);
act
.
broadcast
(
sm
.
transport_msg
()
);
act
.
broadcast
(
sm
.
transport_msg
()
);
ulog
<<
"
\n\n\n
"
;
ulog
any
<<
"
\n\n\n
"
;
ulog
<<
"(Skel::main): -------------- Skel START -------------------------
\n\n
"
;
ulog
any
<<
"(Skel::main): -------------- Skel START -------------------------
\n\n
"
;
dlog
<<
"
\n\n\n
"
;
dlog
any
<<
"
\n\n\n
"
;
dlog
<<
"(Skel::main): -------------- Skel START -------------------------
\n\n
"
;
dlog
any
<<
"(Skel::main): -------------- Skel START -------------------------
\n\n
"
;
act
->
run
(
false
);
act
->
run
(
false
);
}
}
catch
(
SystemError
&
err
)
catch
(
SystemError
&
err
)
...
...
Utilities/codegen/tests/testgen.src.xml
View file @
06161ca0
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<item
name=
"input1_s"
vartype=
"in"
comment=
"comment for input1"
smTestID=
"1"
/>
<item
name=
"input1_s"
vartype=
"in"
comment=
"comment for input1"
smTestID=
"1"
/>
<item
name=
"input2_s"
vartype=
"in"
comment=
"comment for input2"
/>
<item
name=
"input2_s"
vartype=
"in"
comment=
"comment for input2"
/>
<item
name=
"output1_c"
vartype=
"out"
omment=
"comment for output1"
no_check_id=
"1"
/>
<item
name=
"output1_c"
vartype=
"out"
omment=
"comment for output1"
no_check_id=
"1"
/>
<item
name=
"loglevel_s"
vartype=
"in"
comment=
"log level control"
loglevel=
"1"
/
>
<!-- <item name="loglevel_s" vartype="in" comment="log level control" loglevel="1"/> --
>
</smap>
</smap>
<msgmap>
<msgmap>
...
...
extensions/IOControl/iocontrol.cc
View file @
06161ca0
...
@@ -24,7 +24,6 @@ int main(int argc, const char **argv)
...
@@ -24,7 +24,6 @@ int main(int argc, const char **argv)
{
{
auto
conf
=
uniset_init
(
argc
,
argv
);
auto
conf
=
uniset_init
(
argc
,
argv
);
conf
->
initDebug
(
dlog
(),
"dlog"
);
string
logfilename
=
conf
->
getArgParam
(
"--io-logfile"
,
"iocontrol.log"
);
string
logfilename
=
conf
->
getArgParam
(
"--io-logfile"
,
"iocontrol.log"
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
dlog
()
->
logFile
(
logname
);
dlog
()
->
logFile
(
logname
);
...
...
extensions/LogicProcessor/logicproc.cc
View file @
06161ca0
...
@@ -18,8 +18,6 @@ int main(int argc, const char **argv)
...
@@ -18,8 +18,6 @@ int main(int argc, const char **argv)
if
(
logfilename
.
empty
()
)
if
(
logfilename
.
empty
()
)
logfilename
=
"logicproc.log"
;
logfilename
=
"logicproc.log"
;
conf
->
initDebug
(
dlog
(),
"dlog"
);
std
::
ostringstream
logname
;
std
::
ostringstream
logname
;
string
dir
(
conf
->
getLogDir
());
string
dir
(
conf
->
getLogDir
());
logname
<<
dir
<<
logfilename
;
logname
<<
dir
<<
logfilename
;
...
...
extensions/LogicProcessor/plogicproc.cc
View file @
06161ca0
...
@@ -20,8 +20,6 @@ int main(int argc, const char **argv)
...
@@ -20,8 +20,6 @@ int main(int argc, const char **argv)
if
(
logfilename
.
empty
()
)
if
(
logfilename
.
empty
()
)
logfilename
=
"logicproc.log"
;
logfilename
=
"logicproc.log"
;
conf
->
initDebug
(
dlog
(),
"dlog"
);
std
::
ostringstream
logname
;
std
::
ostringstream
logname
;
string
dir
(
conf
->
getLogDir
());
string
dir
(
conf
->
getLogDir
());
logname
<<
dir
<<
logfilename
;
logname
<<
dir
<<
logfilename
;
...
...
extensions/ModbusMaster/main.cc
View file @
06161ca0
...
@@ -30,8 +30,6 @@ int main( int argc, const char** argv )
...
@@ -30,8 +30,6 @@ int main( int argc, const char** argv )
if
(
logfilename
.
empty
()
)
if
(
logfilename
.
empty
()
)
logfilename
=
"mbtcpmaster.log"
;
logfilename
=
"mbtcpmaster.log"
;
conf
->
initDebug
(
dlog
(),
"dlog"
);
std
::
ostringstream
logname
;
std
::
ostringstream
logname
;
string
dir
(
conf
->
getLogDir
());
string
dir
(
conf
->
getLogDir
());
logname
<<
dir
<<
logfilename
;
logname
<<
dir
<<
logfilename
;
...
...
extensions/ModbusMaster/multi-main.cc
View file @
06161ca0
...
@@ -29,8 +29,6 @@ int main( int argc, const char** argv )
...
@@ -29,8 +29,6 @@ int main( int argc, const char** argv )
if
(
logfilename
.
empty
()
)
if
(
logfilename
.
empty
()
)
logfilename
=
"mbtcpmultimaster.log"
;
logfilename
=
"mbtcpmultimaster.log"
;
conf
->
initDebug
(
dlog
(),
"dlog"
);
std
::
ostringstream
logname
;
std
::
ostringstream
logname
;
string
dir
(
conf
->
getLogDir
());
string
dir
(
conf
->
getLogDir
());
logname
<<
dir
<<
logfilename
;
logname
<<
dir
<<
logfilename
;
...
...
extensions/ModbusMaster/rtuexchange.cc
View file @
06161ca0
...
@@ -28,8 +28,6 @@ int main( int argc, char** argv )
...
@@ -28,8 +28,6 @@ int main( int argc, char** argv )
if
(
logfilename
.
empty
()
)
if
(
logfilename
.
empty
()
)
logfilename
=
"rtuexchange.log"
;
logfilename
=
"rtuexchange.log"
;
conf
->
initDebug
(
dlog
(),
"dlog"
);
std
::
ostringstream
logname
;
std
::
ostringstream
logname
;
string
dir
(
conf
->
getLogDir
());
string
dir
(
conf
->
getLogDir
());
logname
<<
dir
<<
logfilename
;
logname
<<
dir
<<
logfilename
;
...
...
extensions/ModbusMaster/tests/run_test_mbtcpmaster.cc
View file @
06161ca0
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
try
try
{
{
auto
conf
=
uniset_init
(
argc
,
argv
);
auto
conf
=
uniset_init
(
argc
,
argv
);
conf
->
initDebug
(
dlog
(),
"dlog"
);
dlog
()
->
logFile
(
"./smtest.log"
);
dlog
()
->
logFile
(
"./smtest.log"
);
bool
apart
=
findArgParam
(
"--apart"
,
argc
,
argv
)
!=
-
1
;
bool
apart
=
findArgParam
(
"--apart"
,
argc
,
argv
)
!=
-
1
;
...
...
extensions/ModbusMaster/tests/run_test_mbtcpmultimaster.cc
View file @
06161ca0
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
try
try
{
{
auto
conf
=
uniset_init
(
argc
,
argv
);
auto
conf
=
uniset_init
(
argc
,
argv
);
conf
->
initDebug
(
dlog
(),
"dlog"
);
dlog
()
->
logFile
(
"./smtest.log"
);
dlog
()
->
logFile
(
"./smtest.log"
);
bool
apart
=
findArgParam
(
"--apart"
,
argc
,
argv
)
!=
-
1
;
bool
apart
=
findArgParam
(
"--apart"
,
argc
,
argv
)
!=
-
1
;
...
...
extensions/ModbusMaster/tests/test_mbtcpmaster.cc
View file @
06161ca0
...
@@ -17,7 +17,7 @@ static ModbusRTU::ModbusAddr slaveADDR = 0x01;
...
@@ -17,7 +17,7 @@ static ModbusRTU::ModbusAddr slaveADDR = 0x01;
static
shared_ptr
<
MBTCPTestServer
>
mbs
;
static
shared_ptr
<
MBTCPTestServer
>
mbs
;
static
shared_ptr
<
UInterface
>
ui
;
static
shared_ptr
<
UInterface
>
ui
;
static
ObjectId
mbID
=
6004
;
// MBTCPMaster1
static
ObjectId
mbID
=
6004
;
// MBTCPMaster1
static
int
polltime
=
5
0
;
// conf->getArgInt("--mbtcp-polltime");
static
int
polltime
=
10
0
;
// conf->getArgInt("--mbtcp-polltime");
static
ObjectId
slaveNotRespond
=
10
;
// Slave_Not_Respond_S
static
ObjectId
slaveNotRespond
=
10
;
// Slave_Not_Respond_S
static
const
ObjectId
exchangeMode
=
11
;
// MBTCPMaster_Mode_AS
static
const
ObjectId
exchangeMode
=
11
;
// MBTCPMaster_Mode_AS
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
...
...
extensions/ModbusMaster/tests/test_mbtcpmultimaster.cc
View file @
06161ca0
...
@@ -30,7 +30,7 @@ static shared_ptr<MBTCPTestServer> mbs1;
...
@@ -30,7 +30,7 @@ static shared_ptr<MBTCPTestServer> mbs1;
static
shared_ptr
<
MBTCPTestServer
>
mbs2
;
static
shared_ptr
<
MBTCPTestServer
>
mbs2
;
static
shared_ptr
<
UInterface
>
ui
;
static
shared_ptr
<
UInterface
>
ui
;
static
ObjectId
mbID
=
6005
;
// MBTCPMultiMaster1
static
ObjectId
mbID
=
6005
;
// MBTCPMultiMaster1
static
int
polltime
=
5
0
;
// conf->getArgInt("--mbtcp-polltime");
static
int
polltime
=
10
0
;
// conf->getArgInt("--mbtcp-polltime");
static
ObjectId
slaveNotRespond
=
10
;
// Slave_Not_Respond_S
static
ObjectId
slaveNotRespond
=
10
;
// Slave_Not_Respond_S
static
ObjectId
slave1NotRespond
=
12
;
// Slave1_Not_Respond_S
static
ObjectId
slave1NotRespond
=
12
;
// Slave1_Not_Respond_S
static
ObjectId
slave2NotRespond
=
13
;
// Slave2_Not_Respond_S
static
ObjectId
slave2NotRespond
=
13
;
// Slave2_Not_Respond_S
...
...
extensions/ModbusSlave/mbslave.cc
View file @
06161ca0
...
@@ -40,8 +40,6 @@ int main(int argc, const char **argv)
...
@@ -40,8 +40,6 @@ int main(int argc, const char **argv)
ulog
()
->
logFile
(
logname
.
str
()
);
ulog
()
->
logFile
(
logname
.
str
()
);
dlog
()
->
logFile
(
logname
.
str
()
);
dlog
()
->
logFile
(
logname
.
str
()
);
conf
->
initDebug
(
dlog
(),
"dlog"
);
ObjectId
shmID
=
DefaultObjectId
;
ObjectId
shmID
=
DefaultObjectId
;
string
sID
=
conf
->
getArgParam
(
"--smemory-id"
);
string
sID
=
conf
->
getArgParam
(
"--smemory-id"
);
if
(
!
sID
.
empty
()
)
if
(
!
sID
.
empty
()
)
...
...
extensions/ModbusSlave/mbtcp-multislave.cc
View file @
06161ca0
...
@@ -40,8 +40,6 @@ int main(int argc, const char **argv)
...
@@ -40,8 +40,6 @@ int main(int argc, const char **argv)
ulog
()
->
logFile
(
logname
.
str
()
);
ulog
()
->
logFile
(
logname
.
str
()
);
dlog
()
->
logFile
(
logname
.
str
()
);
dlog
()
->
logFile
(
logname
.
str
()
);
conf
->
initDebug
(
dlog
(),
"dlog"
);
ObjectId
shmID
=
DefaultObjectId
;
ObjectId
shmID
=
DefaultObjectId
;
string
sID
=
conf
->
getArgParam
(
"--smemory-id"
);
string
sID
=
conf
->
getArgParam
(
"--smemory-id"
);
if
(
!
sID
.
empty
()
)
if
(
!
sID
.
empty
()
)
...
...
extensions/ModbusSlave/tests/tests_with_sm.cc
View file @
06161ca0
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
try
try
{
{
auto
conf
=
uniset_init
(
argc
,
argv
);
auto
conf
=
uniset_init
(
argc
,
argv
);
conf
->
initDebug
(
dlog
(),
"dlog"
);
bool
apart
=
findArgParam
(
"--apart"
,
argc
,
argv
)
!=
-
1
;
bool
apart
=
findArgParam
(
"--apart"
,
argc
,
argv
)
!=
-
1
;
...
...
extensions/RRDServer/main.cc
View file @
06161ca0
...
@@ -30,8 +30,6 @@ int main( int argc, const char** argv )
...
@@ -30,8 +30,6 @@ int main( int argc, const char** argv )
if
(
logfilename
.
empty
()
)
if
(
logfilename
.
empty
()
)
logfilename
=
"rrdstorage.log"
;
logfilename
=
"rrdstorage.log"
;
conf
->
initDebug
(
dlog
(),
"dlog"
);
std
::
ostringstream
logname
;
std
::
ostringstream
logname
;
string
dir
(
conf
->
getLogDir
());
string
dir
(
conf
->
getLogDir
());
logname
<<
dir
<<
logfilename
;
logname
<<
dir
<<
logfilename
;
...
...
extensions/SMDBServer/main.cc
View file @
06161ca0
...
@@ -29,8 +29,6 @@ int main( int argc, const char** argv )
...
@@ -29,8 +29,6 @@ int main( int argc, const char** argv )
if
(
logfilename
.
empty
()
)
if
(
logfilename
.
empty
()
)
logfilename
=
"smdbserver.log"
;
logfilename
=
"smdbserver.log"
;
conf
->
initDebug
(
dlog
,
"dlog"
);
std
::
ostringstream
logname
;
std
::
ostringstream
logname
;
string
dir
(
conf
->
getLogDir
());
string
dir
(
conf
->
getLogDir
());
logname
<<
dir
<<
logfilename
;
logname
<<
dir
<<
logfilename
;
...
...
extensions/SharedMemory/smemory.cc
View file @
06161ca0
...
@@ -23,7 +23,6 @@ int main(int argc, const char **argv)
...
@@ -23,7 +23,6 @@ int main(int argc, const char **argv)
{
{
auto
conf
=
uniset_init
(
argc
,
argv
);
auto
conf
=
uniset_init
(
argc
,
argv
);
conf
->
initDebug
(
dlog
(),
"dlog"
);
string
logfilename
=
conf
->
getArgParam
(
"--logfile"
,
"smemory.log"
);
string
logfilename
=
conf
->
getArgParam
(
"--logfile"
,
"smemory.log"
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
ulog
()
->
logFile
(
logname
);
ulog
()
->
logFile
(
logname
);
...
...
extensions/SharedMemoryPlus/smemory-plus.cc
View file @
06161ca0
...
@@ -74,7 +74,7 @@ int main( int argc, const char **argv )
...
@@ -74,7 +74,7 @@ int main( int argc, const char **argv )
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
UniSetExtensions
::
dlog
()
->
logFile
(
logname
);
UniSetExtensions
::
dlog
()
->
logFile
(
logname
);
ulog
()
->
logFile
(
logname
);
ulog
()
->
logFile
(
logname
);
conf
->
initDebug
(
UniSetExtensions
::
dlog
(),
"dlog"
);
dlog
()
->
logFile
(
logname
);
auto
act
=
UniSetActivator
::
Instance
();
auto
act
=
UniSetActivator
::
Instance
();
act
->
signal_terminate_event
().
connect
(
&
activator_terminate
);
act
->
signal_terminate_event
().
connect
(
&
activator_terminate
);
...
...
extensions/UNetUDP/tests/tests_individual_process.cc
View file @
06161ca0
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
try
try
{
{
uniset_init
(
argc
,
argv
);
uniset_init
(
argc
,
argv
);
conf
->
initDebug
(
dlog
,
"dlog"
);
UNetExchange
*
unet
=
UNetExchange
::
init_unetexchange
(
argc
,
argv
,
getSharedMemoryID
());
UNetExchange
*
unet
=
UNetExchange
::
init_unetexchange
(
argc
,
argv
,
getSharedMemoryID
());
if
(
!
unet
)
if
(
!
unet
)
...
...
extensions/UNetUDP/tests/tests_with_sm.cc
View file @
06161ca0
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
...
@@ -32,7 +32,6 @@ int main(int argc, char* argv[] )
try
try
{
{
auto
conf
=
uniset_init
(
argc
,
argv
);
auto
conf
=
uniset_init
(
argc
,
argv
);
conf
->
initDebug
(
dlog
(),
"dlog"
);
bool
apart
=
findArgParam
(
"--apart"
,
argc
,
argv
)
!=
-
1
;
bool
apart
=
findArgParam
(
"--apart"
,
argc
,
argv
)
!=
-
1
;
...
...
extensions/UNetUDP/unetexchange.cc
View file @
06161ca0
...
@@ -34,7 +34,6 @@ int main( int argc, const char** argv )
...
@@ -34,7 +34,6 @@ int main( int argc, const char** argv )
logname
<<
dir
<<
logfilename
;
logname
<<
dir
<<
logfilename
;
ulog
()
->
logFile
(
logname
.
str
()
);
ulog
()
->
logFile
(
logname
.
str
()
);
UniSetExtensions
::
dlog
()
->
logFile
(
logname
.
str
()
);
UniSetExtensions
::
dlog
()
->
logFile
(
logname
.
str
()
);
conf
->
initDebug
(
UniSetExtensions
::
dlog
(),
"dlog"
);
ObjectId
shmID
=
DefaultObjectId
;
ObjectId
shmID
=
DefaultObjectId
;
string
sID
=
conf
->
getArgParam
(
"--smemory-id"
);
string
sID
=
conf
->
getArgParam
(
"--smemory-id"
);
...
...
extensions/UniNetwork/uninet.cc
View file @
06161ca0
...
@@ -21,7 +21,6 @@ int main(int argc, const char **argv)
...
@@ -21,7 +21,6 @@ int main(int argc, const char **argv)
{
{
auto
conf
=
uniset_init
(
argc
,
argv
);
auto
conf
=
uniset_init
(
argc
,
argv
);
conf
->
initDebug
(
dlog
(),
"dlog"
);
string
logfilename
=
conf
->
getArgParam
(
"--logfile"
,
"smemory.log"
);
string
logfilename
=
conf
->
getArgParam
(
"--logfile"
,
"smemory.log"
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
ulog
()
->
logFile
(
logname
);
ulog
()
->
logFile
(
logname
);
...
...
extensions/lib/Extensions.cc
View file @
06161ca0
...
@@ -15,7 +15,13 @@ namespace UniSetExtensions
...
@@ -15,7 +15,13 @@ namespace UniSetExtensions
{
{
if
(
_dlog
)
if
(
_dlog
)
return
_dlog
;
return
_dlog
;
_dlog
=
make_shared
<
DebugStream
>
();
_dlog
=
make_shared
<
DebugStream
>
();
auto
conf
=
uniset_conf
();
if
(
conf
)
conf
->
initDebug
(
_dlog
,
"dlog"
);
return
_dlog
;
return
_dlog
;
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
...
...
extensions/tests/SMemoryTest/smemory-test.cc
View file @
06161ca0
...
@@ -23,11 +23,10 @@ int main(int argc, const char **argv)
...
@@ -23,11 +23,10 @@ int main(int argc, const char **argv)
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
"configure.xml"
);
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
"configure.xml"
);
conf
=
new
Configuration
(
argc
,
argv
,
confile
);
conf
=
new
Configuration
(
argc
,
argv
,
confile
);
conf
->
initDebug
(
dlog
,
"dlog"
);
string
logfilename
=
conf
->
getArgParam
(
"--logfile"
,
"smemory.log"
);
string
logfilename
=
conf
->
getArgParam
(
"--logfile"
,
"smemory.log"
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
string
logname
(
conf
->
getLogDir
()
+
logfilename
);
ulog
.
logFile
(
logname
);
ulog
()
->
logFile
(
logname
);
dlog
.
logFile
(
logname
);
dlog
()
->
logFile
(
logname
);
auto
shm
=
SharedMemory
::
init_smemory
(
argc
,
argv
);
auto
shm
=
SharedMemory
::
init_smemory
(
argc
,
argv
);
if
(
!
shm
)
if
(
!
shm
)
...
...
src/Various/Configuration.cc
View file @
06161ca0
...
@@ -75,7 +75,7 @@ ostream& UniSetTypes::Configuration::help(ostream& os)
...
@@ -75,7 +75,7 @@ ostream& UniSetTypes::Configuration::help(ostream& os)
namespace
UniSetTypes
namespace
UniSetTypes
{
{
static
shared_ptr
<
Configuration
>
uconf
;
static
shared_ptr
<
Configuration
>
uconf
;
static
std
::
shared_ptr
<
DebugStream
>
_ulog
;
static
std
::
shared_ptr
<
DebugStream
>
_ulog
=
nullptr
;
std
::
shared_ptr
<
DebugStream
>
ulog
()
std
::
shared_ptr
<
DebugStream
>
ulog
()
{
{
...
@@ -83,6 +83,7 @@ namespace UniSetTypes
...
@@ -83,6 +83,7 @@ namespace UniSetTypes
return
_ulog
;
return
_ulog
;
_ulog
=
make_shared
<
DebugStream
>
();
_ulog
=
make_shared
<
DebugStream
>
();
_ulog
->
setLogName
(
"ulog"
);
return
_ulog
;
return
_ulog
;
}
}
...
@@ -1056,8 +1057,6 @@ std::shared_ptr<Configuration> uniset_init( int argc, const char* const* argv, c
...
@@ -1056,8 +1057,6 @@ std::shared_ptr<Configuration> uniset_init( int argc, const char* const* argv, c
atexit
(
UniSetActivator
::
normalexit
);
atexit
(
UniSetActivator
::
normalexit
);
set_terminate
(
UniSetActivator
::
normalterminate
);
// ловушка для неизвестных исключений
set_terminate
(
UniSetActivator
::
normalterminate
);
// ловушка для неизвестных исключений
ulog
()
->
setLogName
(
"ulog"
);
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
xmlfile
);
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
xmlfile
);
UniSetTypes
::
uconf
=
make_shared
<
Configuration
>
(
argc
,
argv
,
confile
);
UniSetTypes
::
uconf
=
make_shared
<
Configuration
>
(
argc
,
argv
,
confile
);
return
UniSetTypes
::
uconf
;
return
UniSetTypes
::
uconf
;
...
...
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