Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
15bc516e
Commit
15bc516e
authored
Sep 29, 2014
by
Serge Hallyn
Committed by
Stéphane Graber
Sep 29, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add file/func/line to debug info
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
fce070c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
log.c
src/lxc/log.c
+5
-2
No files found.
src/lxc/log.c
View file @
15bc516e
...
...
@@ -72,6 +72,7 @@ static int log_append_stderr(const struct lxc_log_appender *appender,
return
0
;
fprintf
(
stderr
,
"%s: "
,
log_prefix
);
fprintf
(
stderr
,
"%s: %s: %d "
,
event
->
locinfo
->
file
,
event
->
locinfo
->
func
,
event
->
locinfo
->
line
);
vfprintf
(
stderr
,
event
->
fmt
,
*
event
->
vap
);
fprintf
(
stderr
,
"
\n
"
);
return
0
;
...
...
@@ -90,12 +91,14 @@ static int log_append_logfile(const struct lxc_log_appender *appender,
ms
=
event
->
timestamp
.
tv_usec
/
1000
;
n
=
snprintf
(
buffer
,
sizeof
(
buffer
),
"%15s %10ld.%03d %-8s %s - "
,
"%15s %10ld.%03d %-8s %s -
%s:%s:%d -
"
,
log_prefix
,
event
->
timestamp
.
tv_sec
,
ms
,
lxc_log_priority_to_string
(
event
->
priority
),
event
->
category
);
event
->
category
,
event
->
locinfo
->
file
,
event
->
locinfo
->
func
,
event
->
locinfo
->
line
);
n
+=
vsnprintf
(
buffer
+
n
,
sizeof
(
buffer
)
-
n
,
event
->
fmt
,
*
event
->
vap
);
...
...
Write
Preview
Markdown
is supported
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