Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
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
jarl
tor
Commits
feca3290
Commit
feca3290
authored
10 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Log version when LD_BUG is logged.
Closes ticket 15026.
parent
4247ce99
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/feature15026
+5
-0
5 additions, 0 deletions
changes/feature15026
src/common/log.c
+14
-0
14 additions, 0 deletions
src/common/log.c
with
19 additions
and
0 deletions
changes/feature15026
0 → 100644
+
5
−
0
View file @
feca3290
o Minor features (logging):
- Include the Tor version in all LD_BUG log messages, since people
tend to cut and paste those into the bugtracker. Implements
ticket 15026.
This diff is collapsed.
Click to expand it.
src/common/log.c
+
14
−
0
View file @
feca3290
...
...
@@ -263,6 +263,13 @@ log_tor_version(logfile_t *lf, int reset)
return
0
;
}
const
char
bug_suffix
[]
=
" (on Tor "
VERSION
#ifndef _MSC_VER
" "
#include
"micro-revision.i"
#endif
")"
;
/** Helper: Format a log message into a fixed-sized buffer. (This is
* factored out of <b>logv</b> so that we never format a message more
* than once.) Return a pointer to the first character of the message
...
...
@@ -341,6 +348,13 @@ format_msg(char *buf, size_t buf_len,
}
}
}
if
(
domain
==
LD_BUG
&&
buf_len
-
n
>
strlen
(
bug_suffix
)
+
1
)
{
memcpy
(
buf
+
n
,
bug_suffix
,
strlen
(
bug_suffix
));
n
+=
strlen
(
bug_suffix
);
}
buf
[
n
]
=
'\n'
;
buf
[
n
+
1
]
=
'\0'
;
*
msg_len_out
=
n
+
1
;
...
...
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