Systems and methods for low interference logging and diagnostics
AssigneeAmazon Technologies, Inc.
InventorJari Juhani Karppanen
Life of this patent
Estimating the term…
Abstract
Techniques described and suggested herein include systems and methods for logging execution of code using thread-local output buffers. For example, one or more output buffers are allocated to one or more threads executing on a computing system. A global declaration list containing information relating to log types (e.g., verbose log descriptions, templates for specific variables, and the like) may be implemented, and the global declaration list may be generated as part of an initialization process for some or all of the threads. Log events from executing threads may be stored in the output buffers in a fashion conforming to the global declaration list, and may be retrieved asynchronously relative to the executing threads.
Claims20
A computer-implemented method, comprising:
- receiving a request to execute an application;
- instantiating one or more execution threads by at least:
- generating a global declaration list from one or more log type declarations associated with the one or more execution threads;
- and
- allocating a plurality of output buffers for the one or more execution threads;
- receiving a log event associated with the application;
- determining whether the log event conforms to at least one of the one or more log type declarations;
- selecting an output buffer of the plurality of output buffers as an active output buffer;
- writing a log entry to the active output buffer, the log entry including information from the log event that represents at least one of the log type declarations;
- and
- providing further information regarding the log event.
A system, comprising:
- one or more processors;
- and
- memory including instructions that, when executed by the one or more processors, cause the system to:
- process a request to start a plurality of threads by at least:
- generating a global declaration list that includes one or more log type declarations;
- allocating output buffers for the plurality of threads;
- and
- at a time after receiving log events from the plurality of threads, writing log entries derived from the log events to the allocated output buffers, the log entries conforming to at least one of the log type declarations.
A non-transitory computer-readable storage medium having stored thereon executable instructions that, when executed by one or more processors of a computer system, cause the computer system to at least:
- receive a request to initialize one or more threads;
- populate a global declaration list with one or more log type declarations associated with the one or more threads;
- map output buffers to the one or more threads;
- and
- write, to the mapped output buffers, log entries generated from log events received from the plurality of threads, such that the log entries conform to one or more formats defined by the log type declarations.
Dependencies are inferred from the claim text.