Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
shrapnel
Commits
fb9c5153
Commit
fb9c5153
authored
Feb 22, 2015
by
rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
describe file logging, and the log interface.
parent
f680de01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
coro/log/README.md
coro/log/README.md
+30
-0
No files found.
coro/log/README.md
View file @
fb9c5153
...
@@ -17,6 +17,36 @@ free-formatted, whatever-the-developer-felt-like-writing log files
...
@@ -17,6 +17,36 @@ free-formatted, whatever-the-developer-felt-like-writing log files
into useful data. Binary logging steps around the problem by making
into useful data. Binary logging steps around the problem by making
the logs machine readable from the start.
the logs machine readable from the start.
You can also instantiate a
``FileLogger``
that will do plain-text logging,
but using the same API.
If you do nothing
-----------------
By default logs are sent to stderr.
Interface
---------
The log-function interface differs from most in that it accepts a
sequence of data items, not a string. On a heavily loaded server this saves
CPU by not formatting log lines (especially when they are not going to be
used because of log levels). When a server is emitting thousands of log lines
per second, the CPU impact can be considerable.
So instead of:
```
python
LOG
(
"blert: thing1: %d thing2: %d"
%
(
v0
,
v1
))
```
You do:
```
python
LOG
(
'blert'
,
v0
,
v1
)
```
Reading the Logs
Reading the Logs
----------------
----------------
...
...
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