-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: reintroduce level attribute to Timer.stop
- Loading branch information
1 parent
32efc58
commit 2418e03
Showing
10 changed files
with
87 additions
and
70 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
if use flake; then | ||
use flake | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import 'package:strlog/src/field.dart' show Field; | ||
import 'package:strlog/src/level.dart'; | ||
import 'package:strlog/src/interface.dart'; | ||
|
||
/// [Timer] is used to measure time between [Interface.startTimer] and [Timer.stop] | ||
/// calls. | ||
abstract interface class Timer { | ||
/// Stops tracing; immediately emits a record with a [message] and | ||
/// measured time. | ||
/// | ||
/// If [stop] is called more than once a [TracerStoppedError] | ||
/// will be raised. | ||
void stop(String message, [Iterable<Field>? fields]); | ||
/// Stops timer and outputs a log record containing a [message] and the measured time between | ||
/// the [Interface.startTimer] call and this [stop] call. | ||
/// | ||
/// An optional [level] can be specified to control the output log level, and | ||
/// additional [fields] can be added to provide extra context in the log record. | ||
void stop(String message, {Level? level, Iterable<Field>? fields}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters