|
7 | 7 |
|
8 | 8 | ## Abstract |
9 | 9 |
|
10 | | -Production systems need robust and consistent logging; casual users want logging |
11 | | -to be as simple as `println()`. The logging interface in Base should support |
12 | | -both these needs in a simple, flexible and efficient way. |
13 | | - |
14 | | -In particular, this proposal seeks to: |
15 | | -* Encourage package authors to include logging by keeping usage simple but |
16 | | - making it efficient and convenient. |
17 | | -* Add a minimum number of features and concepts required to support log |
18 | | - filtering, formatting, and dispatch in production environments. |
19 | | -* Unify logging under a common interface to avoid inconsistency of logging |
20 | | - configuration and handling between packages. |
| 10 | +*Logging* is a tool for understanding program execution by recording the order and |
| 11 | +timing of a sequence of events. A *logging library* provides tools to define |
| 12 | +these events in the source code and capture the event stream when the program runs. |
| 13 | +The information captured from each event makes its way through the system as a |
| 14 | +*log record*. The ideal logging library should give developers and users insight |
| 15 | +into the running of their software by provide tools to filter, save and |
| 16 | +visualize these records. |
| 17 | + |
| 18 | +Julia has included simple logging in `Base` since version 0.1, but the tools to |
| 19 | +generate and capture events are still immature as of version 0.6. For example, |
| 20 | +log messages are unstructured, there's no systematic capture of log metadata, no |
| 21 | +debug logging, inflexible dispatch and filtering, and the role of the code at |
| 22 | +the log site isn't completely clear. Because of this, Julia 0.6 packages use |
| 23 | +any of several incompatible logging libraries, and there's no systematic way to |
| 24 | +generate and capture log messages. |
| 25 | + |
| 26 | +This julep aims to improve the situation by proposing: |
| 27 | + |
| 28 | +* A simple, unified interface to generate log events in `Base` |
| 29 | +* Conventions for the structure and semantics of the resulting log records |
| 30 | +* A minimum of dispatch machinery to capture, route and filter log records |
| 31 | +* A default backend for displaying, filtering and interacting with the log |
| 32 | + stream which makes the log record structure visible. |
| 33 | + |
| 34 | +A non-goal is to create a complete set of logging backends - these can be |
| 35 | +supplied by packages. |
21 | 36 |
|
22 | 37 | ## Desirable features |
23 | 38 |
|
|
0 commit comments