Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
8ea78063
Commit
8ea78063
authored
16 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Make severity args to add_*_log() functions be const
svn:r16775
parent
c33dde4a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/log.c
+5
-5
5 additions, 5 deletions
src/common/log.c
src/common/log.h
+4
-4
4 additions, 4 deletions
src/common/log.h
with
9 additions
and
9 deletions
src/common/log.c
+
5
−
5
View file @
8ea78063
...
...
@@ -497,7 +497,7 @@ set_log_severity_config(int loglevelMin, int loglevelMax,
/** Add a log handler named <b>name</b> to send all messages in <b>severity</b>
* to <b>stream</b>. Copies <b>severity</b>. Helper: does no locking. */
static
void
add_stream_log_impl
(
log_severity_list_t
*
severity
,
add_stream_log_impl
(
const
log_severity_list_t
*
severity
,
const
char
*
name
,
FILE
*
stream
)
{
logfile_t
*
lf
;
...
...
@@ -515,7 +515,7 @@ add_stream_log_impl(log_severity_list_t *severity,
* to <b>stream</b>. Steals a reference to <b>severity</b>; the caller must
* not use it after calling this function. */
void
add_stream_log
(
log_severity_list_t
*
severity
,
add_stream_log
(
const
log_severity_list_t
*
severity
,
const
char
*
name
,
FILE
*
stream
)
{
LOCK_LOGS
();
...
...
@@ -551,7 +551,7 @@ add_temp_log(int min_severity)
* to the function <b>cb</b>.
*/
int
add_callback_log
(
log_severity_list_t
*
severity
,
log_callback
cb
)
add_callback_log
(
const
log_severity_list_t
*
severity
,
log_callback
cb
)
{
logfile_t
*
lf
;
lf
=
tor_malloc_zero
(
sizeof
(
logfile_t
));
...
...
@@ -640,7 +640,7 @@ mark_logs_temp(void)
* (by fopen).
*/
int
add_file_log
(
log_severity_list_t
*
severity
,
const
char
*
filename
)
add_file_log
(
const
log_severity_list_t
*
severity
,
const
char
*
filename
)
{
FILE
*
f
;
logfile_t
*
lf
;
...
...
@@ -667,7 +667,7 @@ add_file_log(log_severity_list_t *severity, const char *filename)
* Add a log handler to send messages to they system log facility.
*/
int
add_syslog_log
(
log_severity_list_t
*
severity
)
add_syslog_log
(
const
log_severity_list_t
*
severity
)
{
logfile_t
*
lf
;
if
(
syslog_count
++
==
0
)
...
...
This diff is collapsed.
Click to expand it.
src/common/log.h
+
4
−
4
View file @
8ea78063
...
...
@@ -120,13 +120,13 @@ int parse_log_severity_config(const char **cfg,
log_severity_list_t
*
severity_out
);
void
set_log_severity_config
(
int
minSeverity
,
int
maxSeverity
,
log_severity_list_t
*
severity_out
);
void
add_stream_log
(
log_severity_list_t
*
severity
,
const
char
*
name
,
void
add_stream_log
(
const
log_severity_list_t
*
severity
,
const
char
*
name
,
FILE
*
stream
);
int
add_file_log
(
log_severity_list_t
*
severity
,
const
char
*
filename
);
int
add_file_log
(
const
log_severity_list_t
*
severity
,
const
char
*
filename
);
#ifdef HAVE_SYSLOG_H
int
add_syslog_log
(
log_severity_list_t
*
severity
);
int
add_syslog_log
(
const
log_severity_list_t
*
severity
);
#endif
int
add_callback_log
(
log_severity_list_t
*
severity
,
log_callback
cb
);
int
add_callback_log
(
const
log_severity_list_t
*
severity
,
log_callback
cb
);
int
get_min_log_level
(
void
);
void
switch_logs_debug
(
void
);
void
logs_free_all
(
void
);
...
...
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