Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
centreon
centreon-connectors
Commits
67d8af4d
Commit
67d8af4d
authored
Nov 26, 2012
by
Dorian Guillois
Browse files
Update connector to use new clib logging api.
parent
379d65a9
Changes
4
Hide whitespace changes
Inline
Side-by-side
perl/build/CMakeLists.txt
View file @
67d8af4d
...
...
@@ -51,6 +51,7 @@ if (WITH_CENTREON_CLIB_INCLUDE_DIR)
message
(
FATAL_ERROR
"Could not find Centreon Clib's headers in
${
WITH_CENTREON_CLIB_INCLUDE_DIR
}
."
)
endif
()
include_directories
(
"
${
WITH_CENTREON_CLIB_INCLUDE_DIR
}
"
)
set
(
CLIB_INCLUDE_DIR
"
${
WITH_CENTREON_CLIB_INCLUDE_DIR
}
"
)
elseif
(
CLIB_FOUND
)
# Was Centreon Clib detected with pkg-config ?
if
(
CMAKE_CXX_FLAGS
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
CLIB_CFLAGS
}
"
)
...
...
@@ -295,3 +296,6 @@ message(STATUS " - Prefix ${CMAKE_INSTALL_PREFIX}")
message
(
STATUS
" - Binary prefix
${
PREFIX_BINARY
}
"
)
message
(
STATUS
" - Package
${
PACKAGE_LIST
}
"
)
message
(
STATUS
""
)
message
(
STATUS
" Libraries"
)
message
(
STATUS
" - clib include directory
${
CLIB_INCLUDE_DIR
}
"
)
message
(
STATUS
" - clib library directory
${
CLIB_LIBRARIES
}
"
)
perl/src/main.cc
View file @
67d8af4d
...
...
@@ -101,21 +101,21 @@ int main(int argc, char** argv, char** env) {
else
{
// Set logging object.
if
(
opts
.
get_argument
(
"debug"
).
get_is_set
())
{
log
ging
::
engine
::
instance
().
set_
show_pid
(
true
);
log
ging
::
engine
::
instance
().
set_
show_thread_id
(
true
);
log
_file
.
show_pid
(
true
);
log
_file
.
show_thread_id
(
true
);
logging
::
engine
::
instance
().
add
(
&
log_file
,
(
1ull
<<
logging
::
type_debug
)
|
(
1ull
<<
logging
::
type_info
)
|
(
1ull
<<
logging
::
type_error
)
,
logging
::
type_debug
|
logging
::
type_info
|
logging
::
type_error
,
logging
::
high
);
}
else
{
log
ging
::
engine
::
instance
().
set_
show_pid
(
false
);
log
ging
::
engine
::
instance
().
set_
show_thread_id
(
false
);
log
_file
.
show_pid
(
false
);
log
_file
.
show_thread_id
(
false
);
logging
::
engine
::
instance
().
add
(
&
log_file
,
(
1ull
<<
logging
::
type_info
)
|
(
1ull
<<
logging
::
type_error
)
,
logging
::
type_info
|
logging
::
type_error
,
logging
::
low
);
}
log_info
(
logging
::
low
)
<<
"Centreon Connector Perl "
...
...
ssh/build/CMakeLists.txt
View file @
67d8af4d
...
...
@@ -149,6 +149,7 @@ if (WITH_CENTREON_CLIB_INCLUDE_DIR)
message
(
FATAL_ERROR
"Could not find Centreon Clib's headers in
${
WITH_CENTREON_CLIB_INCLUDE_DIR
}
."
)
endif
()
include_directories
(
"
${
WITH_CENTREON_CLIB_INCLUDE_DIR
}
"
)
set
(
CLIB_INCLUDE_DIR
"
${
WITH_CENTREON_CLIB_INCLUDE_DIR
}
"
)
elseif
(
CLIB_FOUND
)
# Was Centreon Clib detected with pkg-config ?
if
(
CMAKE_CXX_FLAGS
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
CLIB_CFLAGS
}
"
)
...
...
@@ -641,3 +642,6 @@ message(STATUS " - Prefix ${CMAKE_INSTALL_PREFIX}")
message
(
STATUS
" - Binary prefix
${
PREFIX_BINARY
}
"
)
message
(
STATUS
" - Package
${
PACKAGE_LIST
}
"
)
message
(
STATUS
""
)
message
(
STATUS
" Libraries"
)
message
(
STATUS
" - clib include directory
${
CLIB_INCLUDE_DIR
}
"
)
message
(
STATUS
" - clib library directory
${
CLIB_LIBRARIES
}
"
)
ssh/src/main.cc
View file @
67d8af4d
...
...
@@ -107,21 +107,21 @@ int main(int argc, char* argv[]) {
else
{
// Set logging object.
if
(
opts
.
get_argument
(
"debug"
).
get_is_set
())
{
log
ging
::
engine
::
instance
().
set_
show_pid
(
true
);
log
ging
::
engine
::
instance
().
set_
show_thread_id
(
true
);
log
_file
.
show_pid
(
true
);
log
_file
.
show_thread_id
(
true
);
logging
::
engine
::
instance
().
add
(
&
log_file
,
(
1ull
<<
logging
::
type_debug
)
|
(
1ull
<<
logging
::
type_info
)
|
(
1ull
<<
logging
::
type_error
)
,
logging
::
type_debug
|
logging
::
type_info
|
logging
::
type_error
,
logging
::
high
);
}
else
{
log
ging
::
engine
::
instance
().
set_
show_pid
(
false
);
log
ging
::
engine
::
instance
().
set_
show_thread_id
(
false
);
log
_file
.
show_pid
(
false
);
log
_file
.
show_thread_id
(
false
);
logging
::
engine
::
instance
().
add
(
&
log_file
,
(
1ull
<<
logging
::
type_info
)
|
(
1ull
<<
logging
::
type_error
)
,
logging
::
type_info
|
logging
::
type_error
,
logging
::
low
);
}
log_info
(
logging
::
low
)
<<
"Centreon Connector SSH "
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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