Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
63d50805
Commit
63d50805
authored
10 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
node: allow to print log
parent
6e12193f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/dhtnode.cpp
+8
-0
8 additions, 0 deletions
tools/dhtnode.cpp
with
8 additions
and
0 deletions
tools/dhtnode.cpp
+
8
−
0
View file @
63d50805
...
@@ -157,6 +157,7 @@ main(int argc, char **argv)
...
@@ -157,6 +157,7 @@ main(int argc, char **argv)
std
::
cout
<<
"Possible commands:"
<<
std
::
endl
;
std
::
cout
<<
"Possible commands:"
<<
std
::
endl
;
std
::
cout
<<
" h, help Print this help message."
<<
std
::
endl
;
std
::
cout
<<
" h, help Print this help message."
<<
std
::
endl
;
std
::
cout
<<
" q, quit Quit the program."
<<
std
::
endl
;
std
::
cout
<<
" q, quit Quit the program."
<<
std
::
endl
;
std
::
cout
<<
" log Print the full DHT log."
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
<<
"Node information:"
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
<<
"Node information:"
<<
std
::
endl
;
std
::
cout
<<
" ll Print basic information and stats about the current node."
<<
std
::
endl
;
std
::
cout
<<
" ll Print basic information and stats about the current node."
<<
std
::
endl
;
...
@@ -195,6 +196,13 @@ main(int argc, char **argv)
...
@@ -195,6 +196,13 @@ main(int argc, char **argv)
std
::
cout
<<
"Searches:"
<<
std
::
endl
;
std
::
cout
<<
"Searches:"
<<
std
::
endl
;
std
::
cout
<<
dht
.
getSearchesLog
(
AF_INET
)
<<
std
::
endl
;
std
::
cout
<<
dht
.
getSearchesLog
(
AF_INET
)
<<
std
::
endl
;
continue
;
continue
;
}
else
if
(
op
==
"log"
)
{
dht
.
setLoggers
(
[](
char
const
*
m
,
va_list
args
){
std
::
cerr
<<
red
;
printLog
(
std
::
cerr
,
m
,
args
);
std
::
cerr
<<
def
;
},
[](
char
const
*
m
,
va_list
args
){
std
::
cout
<<
yellow
;
printLog
(
std
::
cout
,
m
,
args
);
std
::
cout
<<
def
;
},
[](
char
const
*
m
,
va_list
args
){
printLog
(
std
::
cout
,
m
,
args
);
}
);
continue
;
}
}
if
(
op
.
empty
())
if
(
op
.
empty
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment