Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jenny Ryan
ouinet
Commits
caa48a7e
Commit
caa48a7e
authored
Dec 15, 2020
by
Ivan Vilata-i-Balaguer
Browse files
Show whether log file is active in client front-end.
With download link.
parent
e115e4ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/client_front_end.cpp
View file @
caa48a7e
...
...
@@ -307,6 +307,10 @@ void ClientFrontEnd::handle_portal( ClientConfig& config
ss
<<
ToggleInput
{
"<u>I</u>njector proxy"
,
"injector_access"
,
'i'
,
config
.
is_injector_access_enabled
()};
ss
<<
ToggleInput
{
"Distributed <u>C</u>ache"
,
"distributed_cache"
,
'c'
,
config
.
is_cache_access_enabled
()};
if
(
logger
.
get_log_file
()
!=
nullptr
)
ss
<<
"Logging debug output to file: "
<<
as_safe_html
(
logger
.
current_log_file
())
<<
" <a href=
\"
"
<<
log_file_apath
<<
"
\"
class=
\"
download
\"
download=
\"
ouinet-logfile.txt
\"
>"
<<
"Download log file"
<<
"</a><br>
\n
"
;
ss
<<
*
_log_level_input
;
ss
<<
"<br>
\n
"
;
...
...
@@ -473,7 +477,7 @@ Response ClientFrontEnd::serve( ClientConfig& config
if
(
path
==
"/ca.pem"
)
{
handle_ca_pem
(
req
,
res
,
ss
,
ca
);
}
else
if
(
path
==
"/
logfile
.txt"
)
{
}
else
if
(
path
==
log
_
file
_apath
)
{
res
.
set
(
http
::
field
::
content_type
,
"text/plain"
);
load_log_file
(
ss
);
}
else
if
(
path
==
group_list_apath
)
{
...
...
src/client_front_end.h
View file @
caa48a7e
...
...
@@ -37,6 +37,7 @@ class ClientFrontEnd {
public:
// Absolute paths of allowed URLs.
inline
static
const
std
::
string
log_file_apath
=
"/logfile.txt"
;
inline
static
const
std
::
string
group_list_apath
=
"/groups.txt"
;
public:
...
...
Write
Preview
Supports
Markdown
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