Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
9828d2b9
Commit
9828d2b9
authored
Mar 17, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add utility script for indenting logs
parent
00e1bce2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
scripts/indent_trace_log.py
scripts/indent_trace_log.py
+34
-0
No files found.
scripts/indent_trace_log.py
0 → 100755
View file @
9828d2b9
#!/usr/bin/env python
# Indents a CAF log with trace verbosity. The script does *not* deal with a log
# with multiple threads.
# usage (read file): indent_trace_log.py FILENAME
# (read stdin): indent_trace_log.py -
import
sys
import
os
import
fileinput
def
read_lines
(
fp
):
indent
=
""
for
line
in
fp
:
if
'TRACE'
in
line
and
'EXIT'
in
line
:
indent
=
indent
[:
-
2
]
sys
.
stdout
.
write
(
indent
)
sys
.
stdout
.
write
(
line
)
if
'TRACE'
in
line
and
'ENTRY'
in
line
:
indent
+=
" "
def
main
():
filepath
=
sys
.
argv
[
1
]
if
filepath
==
'-'
:
read_lines
(
fileinput
.
input
())
else
:
if
not
os
.
path
.
isfile
(
filepath
):
sys
.
exit
()
with
open
(
filepath
)
as
fp
:
read_lines
(
fp
)
if
__name__
==
"__main__"
:
main
()
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