Fix two documentation typos.
Chris Hines
7 years ago
79 | 79 | // same logger to remain separate from other log events. Package log provides |
80 | 80 | // two simple solutions for concurrent safe logging. |
81 | 81 | // |
82 | // NewSyncWriter wraps a io.Writer and serializes each call to its Write | |
82 | // NewSyncWriter wraps an io.Writer and serializes each call to its Write | |
83 | 83 | // method. Using a SyncWriter has the benefit that the smallest practical |
84 | 84 | // portion of the logging logic is performed within a mutex, but it requires |
85 | 85 | // the formatting Logger to make only one call to Write per log event. |
86 | 86 | // |
87 | // NewSyncLogger wraps any Logger and serializes each to to its Log method. | |
87 | // NewSyncLogger wraps any Logger and serializes each call to its Log method. | |
88 | 88 | // Using a SyncLogger has the benefit that it guarantees each log event is |
89 | 89 | // handled atomically within the wrapped logger, but it typically serializes |
90 | 90 | // both the formatting and output logic. Use a SyncLogger if the formatting |